P is for Practical | |
PerlMonks |
Complex regex questionby Cody Fendant (Hermit) |
on Sep 25, 2019 at 06:06 UTC ( [id://11106665]=perlquestion: print w/replies, xml ) | Need Help?? |
Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question: Trying to match a pattern which is roughly a-or-b-followed by digits or digits-followed-by-a-or-b.
So far so good for the first pattern. Here's the other
The second regex matches fine for that other format. Here's what I've been struggling over for half an hour or so: what if the two formats are mixed up? Shouldn't I be able to come up with a regex matching either pattern?
Please help me out, Monks. What am I doing wrong and what are the undefs in my @results?
Back to
Seekers of Perl Wisdom
|
|