RE: Matching Greek letters in UTF-8 file

2011-10-10 Thread Hamann, T.D. (Thomas)
ey occur in two unique formats throughout the whole document (which should match \w- and -\w- ). Thomas Van: Brian Fraser [frase...@gmail.com] Verzonden: donderdag 29 september 2011 16:59 Aan: John Delacour CC: beginners@perl.org Onderwerp: Re: Matching G

Re: Matching Greek letters in UTF-8 file

2011-09-29 Thread John Delacour
At 17:29 -0300 29/9/11, Brian Fraser wrote: On Thu, Sep 29, 2011 at 4:03 PM, John Delacour wrote: Nitpick: Why the upper-case charset name? Uppercase is UTF-8-strict, while lowercase is the lax version that perl uses internally. Unless you are passing data from one perl program to anothe

Re: Matching Greek letters in UTF-8 file

2011-09-29 Thread Brian Fraser
On Thu, Sep 29, 2011 at 4:03 PM, John Delacour wrote: > > Nitpick: Why the upper-case charset name? > Uppercase is UTF-8-strict, while lowercase is the lax version that perl uses internally. Unless you are passing data from one perl program to another, and you are using illegal-UTF8-but-legal-UT

Re: Matching Greek letters in UTF-8 file

2011-09-29 Thread John Delacour
At 11:59 -0300 29/9/11, Brian Fraser wrote: On Thu, Sep 29, 2011 at 10:58 AM, John Delacour wrote: use encoding 'utf-8'; Nitpick: Please don't use this, as encoding is broken. use utf8; and use open qw< :std :encoding(UTF-8) >; should make do for a replacement. Nitpick: Why the upper-c

Re: Matching Greek letters in UTF-8 file

2011-09-29 Thread Brian Fraser
On Thu, Sep 29, 2011 at 10:58 AM, John Delacour wrote: > use encoding 'utf-8'; > > Nitpick: Please don't use this, as encoding is broken. use utf8; and use open qw< :std :encoding(UTF-8) >; should make do for a replacement. To the original poster, please note that there's a bit of a difference i

Re: Matching Greek letters in UTF-8 file

2011-09-29 Thread John Delacour
At 11:42 + 29/9/11, Hamann, T.D. (Thomas) wrote: I need to write a regex that matches any single Greek letter followed by a hyphen in a UTF-8 text file that is otherwise in English. How can I match the Greek alphabet (lower and upper case)? #!/usr/local/bin/perl use strict; use utf8; us

Matching Greek letters in UTF-8 file

2011-09-29 Thread Hamann, T.D. (Thomas)
Hi, I need to write a regex that matches any single Greek letter followed by a hyphen in a UTF-8 text file that is otherwise in English. How can I match the Greek alphabet (lower and upper case)? Thanks, Thomas -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands