Hi,
I'm trying to replace the following pattern with a blank field, but haven't been able to do so
$match ='C:\data\random\unnecessary';
$sentence = 'C:\data\random\unnecessary\necessary_part\this too\finally_here.docx';
$match =~ s!$sentence!!g;
print $match;
So, I'm looking for a result like,
match ====> necessary_part\this too
and also,
new_variable ====> finally_here.docx
I just wanted to know if there was a simple way to go about this, coz i would have been able to do the same in tcl using regexp match and regsub.
I'm trying to replace the following pattern with a blank field, but haven't been able to do so
$match ='C:\data\random\unnecessary';
$sentence = 'C:\data\random\unnecessary\necessary_part\this too\finally_here.docx';
$match =~ s!$sentence!!g;
print $match;
So, I'm looking for a result like,
match ====> necessary_part\this too
and also,
new_variable ====> finally_here.docx
I just wanted to know if there was a simple way to go about this, coz i would have been able to do the same in tcl using regexp match and regsub.