Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: searching backwards in a string

by chromatic (Archbishop)
on Jun 13, 2000 at 03:47 UTC ( [id://17814]=note: print w/replies, xml ) Need Help??


in reply to searching backwards in a string

You can take advantage of greediness, in this case: $string =~ /(.*)\s(\S*?)/; That'll match greedily before the white space and minimally after it. I agree with plaid, though. Use a CPAN module for wrapping.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-26 07:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found