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] /(?:.*\.)?(.*)/ /([^.]+)$/
|
---|
In Section
Seekers of Perl Wisdom