Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: One regex construct to handle multiple string types

by JavaFan (Canon)
on Dec 01, 2008 at 12:54 UTC ( [id://727080]=note: print w/replies, xml ) Need Help??


in reply to One regex construct to handle multiple string types

The problem with asking a questing about how to match string, and just providing two examples of the problem is that noone knows what you mean. Some simple "solutions" that match all your examples include:
/(2L)/ /(..)$/ /(\p{Nd}\p{LU})/ /(?:bar.|^)(..)/ (split /\./)[0] /(?:.*\.)?(.*)/ /([^.]+)$/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-19 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found