>
> You probably want to use the word boundary assertion:
>
> s/\bTR\b/TC/g;
>
> See "perldoc perlre".
>
> --
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl
Thanks! This worked.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTE
Radhika Sambamurti wrote:
I am trying to substitute "TR" for "TC".
But I do not want words like "AUDIT TRAIL" to be substituted.
So my regexp is:
if( =~ / TR / ) {
s/TR/TC/g
}
But this is not exactly working.
You probably want to use the word boundary assertion:
s/\bTR\b/TC/g;
See "perldoc perl
Hi,
I am trying to substitute "TR" for "TC".
But I do not want words like "AUDIT TRAIL" to be substituted.
So my regexp is:
if( =~ / TR / ) {
s/TR/TC/g
}
But this is not exactly working.
As i want only those instances when TR is surrounded by spaces ie not part
of any other word to be substitute