XP is just a number | |
PerlMonks |
Re: searching backwards in a stringby chromatic (Archbishop) |
on Jun 13, 2000 at 03:47 UTC ( [id://17814]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|