Perl-Sensitive Sunglasses | |
PerlMonks |
Question about conditional regex captureby TASdvlper (Monk) |
on May 18, 2004 at 19:56 UTC ( [id://354415]=perlquestion: print w/replies, xml ) | Need Help?? |
TASdvlper has asked for the wisdom of the Perl Monks concerning the following question:
Hello all,
I have another regexp question (seems to be my favorite topic). I'm trying to parse the output of a cli command, and I'm looking for string, in each output line, that consists of digits seperated by periods. i.e. but, my problem is, I don't want to capture the output if the 3 field, from the left, is a 0,1,2, or 3. But, it can start with it. I have this snippet: But this will not work if the 3rd field is a double digit. So, to elaborate more, the following I want to ignore: but, these I do want to capture: Basically, if the 3rd field is > 3, I want to capture it. Any thoughts on to do this ???? Thx. 20040519 Edit by Corion: Changed title from 'Another regular expression'
Back to
Seekers of Perl Wisdom
|
|