in reply to Quick Regex question
$blah2 =~ s/\w+//;
Update: Note this doesn't prevent you from doing this:
But you should be careful about maintainability. This trick appears to only work with the m// construct in list context.my ($word) = $string =~ /(\W+)/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Quick Regex question
by runrig (Abbot) on Nov 18, 2000 at 02:45 UTC |