re.split question
Steffen Ries
steffen.ries at sympatico.ca
Thu Jun 22 20:28:15 EDT 2000
bragib at my-deja.com writes:
> This goes using re:
>
> >>> p = '\,'
> >>> pat = re.compile(p, re.IGNORECASE)
> >>> t = 'uid=joe, ou=orgunit, o=some\\org'
> >>> pat.split(t)
> ['uid=joe', ' ou=orgunit', ' o=some\\org']
Unfortunately, this does not do what I need:
>>> t='uid=joe, ou=orgunit, o=some\\, org'
>>> pat.split(t)
['uid=joe', ' ou=orgunit', ' o=some\\', ' org']
the last two elements should be one (i.e. 'o=some\\, org')
(string.split has the same problem)
/steffen
--
steffen.ries at sympatico.ca <> Gravity is a myth -- the Earth sucks!
More information about the Python-list
mailing list