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? Thanks.