live4tech has asked for the wisdom of the Perl Monks concerning the following question:
Hello. I do not understand why the following regex does not match "123dog":
/\A\d+[a-z]+\z/
I can get this to match with an app that checks regex expressions, but not within a perl program.
Also, I can get /^\d+[a-z]+$/ to always match, either within the perl program or in a regex checking app.
Does anyone know why this is? Am I missing something obvious?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: REGEX problem with anchors
by mbethke (Hermit) on Feb 05, 2013 at 06:50 UTC | |
by live4tech (Sexton) on Feb 05, 2013 at 07:10 UTC | |
by tobias_hofer (Friar) on Feb 05, 2013 at 08:34 UTC | |
Re: REGEX problem with anchors
by kcott (Archbishop) on Feb 05, 2013 at 09:52 UTC | |
by 7stud (Deacon) on Feb 05, 2013 at 17:07 UTC |
Back to
Seekers of Perl Wisdom