G
Geoff Cox
Hello,
I am trying to replace the text between the \ and the .j - there may
be multiple instances in the line with different text between the \
and the .j
The following does not work.
if ($line =~ /\\(.*?)\.j/g ) {
$line =~ s/$1/fred/g;
}
I thought \\ would find the \ and using .*? would get the minimum
characters between a \ and the next .j but I must be wrong?
Also not sure about the use of /g
Cheers
Geoff
I am trying to replace the text between the \ and the .j - there may
be multiple instances in the line with different text between the \
and the .j
The following does not work.
if ($line =~ /\\(.*?)\.j/g ) {
$line =~ s/$1/fred/g;
}
I thought \\ would find the \ and using .*? would get the minimum
characters between a \ and the next .j but I must be wrong?
Also not sure about the use of /g
Cheers
Geoff