use Regexp::Common 'pattern'; pattern name => ['squish'], create => '\W+'; my $name = "Rob J Anderson"; my $squished_name; $squished_name = $RE{squish}->subs($name); # Following only needed because of /g: $squished_name = $RE{squish}->subs($squished_name) while $RE{squish}->matches($squished_name);
In reply to Re: Idiom for a regex translation
by Anonymous Monk
in thread Idiom for a regex translation
by reasonablekeith
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |