Felix Collins wrote: > Hi, > I'm not a regexp expert and had a bit of trouble with the following search. > I have an "outline number" system like > 1 > 1.2 > 1.2.3 > I want to parse an outline number and return the parent.
Seems to me regex is not the way to go:
def parent(string):
return string[: string.rindex('.')]
--
http://mail.python.org/mailman/listinfo/python-list
