PDA

View Full Version : Regular Expression problem


blah32
08-09-2009, 05:17 AM
I am newish to regex's, but I don't understand why this does not work:

re.sub('\/\/(.*)/n' , "\n", inputstr)

what I am trying to do is replace all the chars in inputstr between "//" and <newline> with a newline char.

Can someone please explain to me how the RE should be made?