RE Despair - help required
Robert Kern
rkern at ucsd.edu
Thu Aug 25 06:44:38 EDT 2005
Yoav wrote:
> I am trying the following:
>
> re.search(r'\\[^"\\]+(?=("?$))', "c:\ret_files")
>
> and I get a return of NoneType, and I have no idea why. I know that I
> missing something here, but I really can't figure out why (I bet it's
> something obvious). I also tried this RE on KODOS and it works fine
> there, so I am really puzzled.
>
> Any ideas?
Look at the second string. It has "\r" in the middle of it where you
really want "\\r" (or alternatively r"c:\ret_files").
--
Robert Kern
rkern at ucsd.edu
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
More information about the Python-list
mailing list