Python student seeks help regex/strings
Petyr David
phynkel at gmail.com
Sun Apr 12 00:30:06 EDT 2009
I'm familiar with simple string substitutions in shell and perl:
string= "I have 30 days to find it"
echo $string | sed "s/\(.*\)\(30\)\(.*\)/\2/
which will (if I did it right) leave 30
and perl likewise.
I'm having trouble figuring out how to do this in Python and it's not
for lack of trying to find an example. It can't be this hard is it?
Hopefully I will limit my newbie questions.
Thanks
Peter
More information about the Python-list
mailing list