Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^3: Detect STX and ETX hex in received stringby ColonelPanic (Friar) |
on Nov 28, 2012 at 13:48 UTC ( [id://1006034]=note: print w/replies, xml ) | Need Help?? |
I interpreted single-character STX and ETX codes as being intrinsic to the problem. Maybe that is not so, however. Here is a multi-character solution:
(I added a substr() to limit the matched string to 80 characters. It appears to me that it's not trivial to meet these requirements entirely within the regex...though I'm sure others will quickly prove me wrong!) When's the last time you used duct tape on a duct? --Larry Wall
In Section
Seekers of Perl Wisdom
|
|