in reply to regex capturing problem
what I believe you want to do is match all wordparts followed by an ' or the end of line like so:
hth@words = $word =~ /(\w+)['\z]?/g;
larryk perl -le "s,,reverse killer,e,y,rifle,lycra,,print"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: regex capturing problem
by pike (Monk) on Mar 21, 2002 at 14:12 UTC | |
by larryk (Friar) on Mar 21, 2002 at 16:23 UTC | |
by petral (Curate) on Mar 21, 2002 at 21:11 UTC |