1

Possible Duplicate:
Python regex matching Unicode properties

I'm trying to port this line of code in PHP to Python:

preg_match_all('/\p{L}[\p{L}\p{Mn}\p{Pd}\'\x{2019}]*/u', $text, $tmp);

What I got:

tmp = re.split('\p{L}[\p{L}\p{Mn}\p{Pd}\'\u2019]*', text, flags=re.U)

But... Python's regular expression syntax doesn't supports \p - Unicode character properties!

Any alternative?

1

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.