in reply to Re: need help with a Regex
in thread need help with a Regex
L~R, you are right with using anchors to limit the scope.
But your solution would only match a single digit instead of a number (not what the OP wanted).
One solution would be (not documented as of dragonchild's post):
++ for the right approach
Monkish Greetings,
Dietz
But your solution would only match a single digit instead of a number (not what the OP wanted).
One solution would be (not documented as of dragonchild's post):
/^(\d+|\?)?$/
++ for the right approach
Monkish Greetings,
Dietz
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: need help with a Regex
by Limbic~Region (Chancellor) on Oct 06, 2004 at 15:44 UTC | |
by Dietz (Curate) on Oct 06, 2004 at 15:58 UTC | |
by Limbic~Region (Chancellor) on Oct 06, 2004 at 16:42 UTC | |
by Dietz (Curate) on Oct 06, 2004 at 16:56 UTC | |
by TedPride (Priest) on Oct 07, 2004 at 09:10 UTC | |
by Limbic~Region (Chancellor) on Oct 07, 2004 at 12:16 UTC | |
Re^3: need help with a Regex
by Eimi Metamorphoumai (Deacon) on Oct 06, 2004 at 15:45 UTC |
In Section
Seekers of Perl Wisdom