>>>>> "S" == Saran <mail2sarava...@gmail.com> 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+) or in the end S> of line(\s+error$). that is way too complex and also slower. whitespace or beginning or end of a string next to a word character is also a word boundary. and your regex doesn't work with '[error]' as it isn't next to white space or string ends. the word boundary regex works there. the /s modifier isn't doing anything since you don't have any . in your regex. also what is the leading ~ doing there? uri -- Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/