Hi all,
   
   I have the following problem in the following regex replace. 
   
  $line=~s!\b($name)\b!<au>$1!g;
   
  here this regex finds the exact matching of the content in $name and does the 
needed but in some examples the variable $name may contain backslash characters 
like 'gene\l=s\' , in this type of cases the replace string does not work so i 
have removed '\b' on either side and used the following
   
  $line=~s!(\Q$name\E)!<au>$1!g;
   
  This works fine but the problem is that the replacement is not done on the 
exact word but also on substrings which is unnecessary.
   
  if i use both \b\b and \Q\E then the code fails to replace.
   
  please send suggestions in this regard
   
  Thanks in advance for the help
   
  Regards
  Anand
   

                                
---------------------------------
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

Reply via email to