In your solution the $ in the character class uses its special meaning and becomes a literal '$'. You have to use a |-construct. Furthermore I would use a characterclass for the first part ... this leads to
$f =~ s/\s([iaeouyE]):(?:\s|$)/ $1 /;Update: Oops, this was meant as a reply to busunsl not to iakobski ...
Update 2: and bikeNomad discovered some left out paras ... thanks, fixed it
-- Hofmator
In reply to Re: Re: finding nonword character at end of strings
by Hofmator
in thread finding nonword character at end of strings
by Micz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |