You know, it shouldn't be mile long. )

$string =~ s! \b (?=[a-z]{3,4}) ([aeiouy]{3,4}|[^aeiouy]{3,4}) \b !\U$1!igx;

-- iD

2011/10/7 Marc <sono...@fannullone.us>

> On Oct 6, 2011, at 4:44 PM, Jim Gibson wrote:
>
> > You should go back to your original character class of
> [bcdfghjklmnpqrstvwxz]
>
>         Making this change fixed the "Rex'S" problem, but it didn't
> capitalize LKJ because the rest of the code had capitalized the acronym as
> Lkj.  So I changed that line to:
> $string =~
> s~\b([aeiouyAEIOUY]{3,4}|[bcdfghjklmnpqrstvwxzBCDFGHJKLMNPQRSTVWXZ]{3,4})\b~uc$1~eg;
>
> and now it works, even though it's a mile long. ;)  Thanks for helping me
> to think about it differently.
>
> Marc
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>

Reply via email to