unicode "em space" in regex

Klaus Alexander Seistrup klaus at seistrup.dk
Sat Apr 16 09:21:51 EDT 2005


Xah Lee :

> how to represent the unicode "em space" in regex?
>
> e.g. i want do something like this:
>
>     fracture=re.split(r'\342371*\|\342371*',myline,re.U)

I'm not sure what you're trying to do, but would it help you to use
it's name:

	>>> EM_SPACE = u'\N{EM SPACE}'
	>>> fracture = myline.split(EM_SPACE)

?

Cheers,

-- 
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmark
http://magnetic-ink.dk/



More information about the Python-list mailing list