Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: One regex construct to handle multiple string types

by ikegami (Patriarch)
on Nov 29, 2008 at 11:35 UTC ( #726767=note: print w/replies, xml ) Need Help??


in reply to Re: One regex construct to handle multiple string types
in thread One regex construct to handle multiple string types

/(.*\.)?(\S+)/

has a needless capture

/(?:.*\.)?(\S+)/

And the .* is useless (OP didn't specify he wanted last possible match)

/\.?(\S+)/

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2022-08-08 04:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?