qsl has asked for the wisdom of the Perl Monks concerning the following question:
Here i want to check,if all the id and run values are 13 and 251 in the lines.For that i want to take the line if it not starts with INFO/DEBUG/ID/<blankspace>.INFO Lindered... DEBUG Using ThreadLocal: false ID Run Timestamp Entry Attempt Message Type Messag +e 13 251 2006-07-06 13:21:14.0 1 1 INFO Starti +ng for (ActivityId=13, DataSource=dunkle-rs) 13 251 2006-07-06 13:21:14.0 2 1 INFO Queryi +ng remote datasource ...
But if i give only one condition,it is working fine for me.How can i check more than one condition here.open fhand,temp; while(<fhand>){ if(($_ !~ /^INFO/) ||($_ !~ /^DEBUG/)||($_ !~ /^ID/)){ print"Line check"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular Expression matching more than one condition
by davorg (Chancellor) on Jul 06, 2006 at 15:16 UTC | |
|
Re: Regular Expression matching more than one condition
by prasadbabu (Prior) on Jul 06, 2006 at 15:24 UTC | |
|
Re: Regular Expression matching more than one condition
by cowboy (Friar) on Jul 06, 2006 at 15:19 UTC | |
|
Re: Regular Expression matching more than one condition
by Ieronim (Friar) on Jul 06, 2006 at 17:25 UTC |