Perl: the Markov chain saw | |
PerlMonks |
Re: Regex to match 20 chars of some digits followed by some spacesby duff (Parson) |
on Dec 19, 2003 at 03:06 UTC ( [id://315731]=note: print w/replies, xml ) | Need Help?? |
Sounds like you just need to move the checking for digits bit into your program logic and out of your rule. I.e., match 20 chars and then in your code, check that you got the requisite number of digits. Something like:
I interpret your example to mean that you always want one digit and one space. Of course, that will let things like "12 56 90123456789 " through, but that's where you use one of those nifty code block after the rule :)
In Section
Seekers of Perl Wisdom
|
|