Georg Koss wrote:
>
> A friendly hello to all of you!
Hello,
> As I'm posting first time here, I'd like to introduce myself as a
> bloody perl-newbie ;(
>
> My problem: I tried to use a regexp in a word counting program and
> encountered that any word with a 'german umlaut' is ignored when using
> the following m// :
>
> $word =~ m/^[a-zA-Z]+([-']+|([-'][a-zA-Z]+))*$/;
>
> How do I have to modify the pattern [a-zA-Z] to include aediaresis,
> oediaresis and uediaresis?
Put this line near the top of your program:
use locale;
Then this should work:
$word =~ m/^[[:alpha:]]+([-']+|([-'][[:alpha:]]+))*$/;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]