Regular expression for matching IPA characters in Unicode?

"Martin v. Löwis" martin at v.loewis.de
Tue Oct 12 00:20:35 EDT 2004


Mickel Grönroos wrote:
> Which is the best way of checking that a given unicode string only 
> contains IPA characters, e.g. characters in the range \u0250-\u02AF?

The regular expression for that is [\u0250-\u02AF]. You can either make
the regular expression a Unicode string itself, or you can make it a
normal (byte) string, and put the backslash-u-number sequence into it
(e.g. with double-backslash quotation).

Regards,
Martin



More information about the Python-list mailing list