Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Regex question

by Marshall (Canon)
on Sep 17, 2023 at 13:19 UTC ( [id://11154500]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regex question
in thread Regex question

Well, I would use \b,
say "$_: ", /\b(10000|[1-9][0-9]{0,3})\b/ ? "Y" : "N" for qw{240 2 3600 1 10000 0 0000 19999 999999999};
Same as your result:
240: Y 2: Y 3600: Y 1: Y 10000: Y 0: N 0000: N 19999: N 999999999: N
updated: made capturing group

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2026-05-11 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.