Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: One regex construct to handle multiple string types

by oko1 (Deacon)
on Nov 29, 2008 at 14:23 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-24 03:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found