Upper/lowercase regex matching in unicode

J

Jason Stitt

What's the best way to match uppercase or lowercase characters with a
regular expression in a unicode-aware way? Obviously [A-Z] and [a-z]
aren't going to cut it. I thought there were character classes of the
form ::upper:: or similar syntax, but can't find them in the docs.
Maybe I'm getting it mixed up with Perl regexen.

The upper() and lower() methods do work on accented characters in a
unicode string, so there has to be some recognition of unicode case
in there somewhere.

Thanks,

Jason
 
G

George Sakkis

Jason Stitt said:
What's the best way to match uppercase or lowercase characters with a
regular expression in a unicode-aware way? Obviously [A-Z] and [a-z]
aren't going to cut it. I thought there were character classes of the
form ::upper:: or similar syntax, but can't find them in the docs.
Maybe I'm getting it mixed up with Perl regexen.

The upper() and lower() methods do work on accented characters in a
unicode string, so there has to be some recognition of unicode case
in there somewhere.

Thanks,

Jason

http://tinyurl.com/7jqgt

George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,809
Latest member
moe77

Latest Threads

Top