ahuang14 has asked for the wisdom of the Perl Monks concerning the following question:
Hey guys,
This might be a very easy thing to do but I just don't know how. I want to be able to match both these strings (using Snort to get packets that contain these expressions)
...16 03 01 34 23 0b.... ...16 03 01 39 4b 0b....
I was wondering if there was a way to write a match expression like "m/16 03 01 anything anything 0b/".
I guess a work around could be to look for the index of "16 03 01" and then say check to see if 6 characters away is "0b," but I was just wondering if there was a better way of doing this. Thanks in advance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating spacers in regex match
by JavaFan (Canon) on Jul 08, 2011 at 15:10 UTC | |
by ahuang14 (Novice) on Jul 08, 2011 at 15:18 UTC | |
by JavaFan (Canon) on Jul 08, 2011 at 15:24 UTC | |
by ahuang14 (Novice) on Jul 08, 2011 at 19:21 UTC | |
by JavaFan (Canon) on Jul 08, 2011 at 21:12 UTC | |
|
Re: Creating spacers in regex match
by Jim (Curate) on Jul 08, 2011 at 19:39 UTC | |
by muba (Priest) on Jul 09, 2011 at 02:32 UTC | |
by Jim (Curate) on Jul 09, 2011 at 05:25 UTC | |
by muba (Priest) on Jul 09, 2011 at 08:13 UTC |