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 ( #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? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2022-08-08 03:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?