Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: REGEX Match Single Digit

by spickles (Scribe)
on Aug 28, 2009 at 16:10 UTC ( [id://791953]=note: print w/replies, xml ) Need Help??


in reply to Re: REGEX Match Single Digit
in thread REGEX Match Single Digit

That's cool. Thanks. From that output, am I understanding that one of my original attempts should have worked?

Replies are listed 'Best First'.
Re^3: REGEX Match Single Digit
by ww (Archbishop) on Aug 28, 2009 at 20:48 UTC
    /\d1{1}/ matches any single decimal digit, "1" included, FOLLOWED BY a single "1".

    toolic's YAPE explanation makes that clear, but your original spec indicates you want a single digit (known in advance, I gather).

    Hence, /1{1}/ for a single "1" anywhere in a line, or /^1{1}$ for a line with a single "1" as its only content.

Re^3: REGEX Match Single Digit
by ikegami (Patriarch) on Aug 28, 2009 at 16:12 UTC
    No

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://791953]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2025-06-16 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.