> "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+
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,
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...@