Re: word boundry

2011-05-18 Thread Uri Guttman
> "S" == Saran writes: S> http://perldoc.perl.org/perlre.html --> Try reading this Assertions S> Page S> You can also try something like S> if(~/\s+error\s+|^error\s+|\s+error$/si) S> this means one or more blank spaces S> sometimes the error word may be in beginning(^error\s+

Re: word boundry

2011-05-18 Thread Saran
http://perldoc.perl.org/perlre.html --> Try reading this Assertions Page You can also try something like if(~/\s+error\s+|^error\s+|\s+error$/si) this means one or more blank spaces sometimes the error word may be in beginning(^error\s+) or in the end of line(\s+error$). ~ Saran On May 18,

Re: word boundry

2011-05-18 Thread Jim Gibson
At 12:06 AM -0700 5/18/11, Irfan Sayed wrote: hi, i need to catch "error" word in log file i used reg exp like this : if ($_ =~ /\berror\b/) is this correct ? Yes, that looks correct. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@