The stupid question is the question not asked | |
PerlMonks |
Re: Range Issue with RegExby liverpole (Monsignor) |
on Jul 10, 2006 at 14:19 UTC ( [id://560147]=note: print w/replies, xml ) | Need Help?? |
There are a few problems in your code:
First of all, [30-33] does NOT match 30, 31, 32; it matches any of the single characters 3, 0 - 3, 3, which is the same as [0-3]. (The expression [...] is a character class, meaning that it matches only a single character). Secondly, when you do /50[0-2]|5[30-33]/, you are trying to match 4 characters in a row: 5, 0, 0-2 or 5, 0-3. I think what you want instead is:
or more simply:
or even:
s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
In Section
Seekers of Perl Wisdom
|
|