in reply to Re: Function over all letters in a string
in thread Function over all letters in a string

Here's a little trick you can use in Latin1 character encoding (instead of locales) to avoid having to name all non-US word characters explicitly: just define the character set as [A-Za-zĄ-’]. If you look at a Latin1 character table, you'll see what it does--and it works for more than just German. :)

--
Allolex

Replies are listed 'Best First'.
Re: Re: Re: Function over all letters in a string
by Beechbone (Friar) on Dec 01, 2003 at 23:48 UTC
    Good point. But I think even more dangerous that using only [a-z] (my example, too). I think this should work quite well:
    next CHAR if $c =~ /^[[:punct:][:cntrl:][:blank:]]$/;
    Add [:digit:] to exclude numbers, too.

    Search, Ask, Know