question on regular expressions

Darren Dale dd55 at cornell.edu
Fri Dec 3 12:44:12 EST 2004


I'm stuck. I'm trying to make this:

file://C:%5Cfolder1%5Cfolder2%5Cmydoc1.pdf,file://C
%5Cfolderx%5Cfoldery%5Cmydoc2.pdf

(no linebreaks) look like this:

./mydoc1.pdf,./mydoc2.pdf

my regular expression abilities are dismal. I won't list all the
unsuccessful things I've tried, in a nutshell, the greedy operators are
messing me up, truncating the output to ./mydoc2.pdf. Could someone offer a
suggestion?

Thanks,
Darren



More information about the Python-list mailing list