No such thing as a small change | |
PerlMonks |
Re^3: Pattern match not working sometimesby GrandFather (Saint) |
on Mar 18, 2012 at 21:42 UTC ( [id://960331]=note: print w/replies, xml ) | Need Help?? |
The issue is the ^ anchor and the character causing grief is a new line at the start of the line! If you change your match to /(\C\C\C\C)(.*)/s the problem is fixed. Note that there is no need for anchors in any case - you want the first four octets followed by anything so that will always match at the start of the string (unless there are fewer than 4 octets).
True laziness is hard work
In Section
Seekers of Perl Wisdom
|
|