Help with Regular Expression

massi_srb at msn.com massi_srb at msn.com
Tue May 19 09:42:56 EDT 2015


Hi everyone,

I succesfully wrote a regex in python in order to substitute all the occurences in the form $"somechars" with another string. Here it is:

re.sub(ur"""(?u)(\$\"[^\"\\]*(?:\\.[^\"\\]*)*\")""", newstring, string)

Now I would need to exclude from the match all the string in the form $", ", can anyone help me to modufy it?
Thanks in advance!




More information about the Python-list mailing list