Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: One regex construct to handle multiple string types

by oko1 (Deacon)
on Nov 29, 2008 at 14:23 UTC ( #726788=note: print w/replies, xml ) Need Help??


in reply to One regex construct to handle multiple string types

If you're looking for a single digit followed by a capital letter (this is a wild guess, since you might just be looking for a literal '2L' anywhere in the string - it's rather hard to tell), then this simple regex will do:

while (<DATA>){ chomp; print "$1\n" if /(\d[A-Z])/; }

--
"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2022-08-08 04:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?