John Pye wrote: > Is there an easy and general way that I can split these perl-style > find-and-replace expressions into something I can use with Python, eg > re.sub('search','replace',str) ?
Another candidate: >>> re.compile(r"(?:/((?:\\.|[^/])*))").findall(r"/abc\\/def\/ghi//jkl") ['abc\\\\', 'def\\/ghi', '', 'jkl'] Peter -- http://mail.python.org/mailman/listinfo/python-list