Hi I'm writing a parser for a certain piece of code right now, and I can't seem to get my regular expressions to do what I want them to do. I have this large file I need to turn into XML and I want to match everything in a certain subset of the string except .SECTION.
So, what I have so far is
Code:
reg1 = re.compile("TAG1[^\.SECTION]*?TAG2")
Now when I do this it is not matching this as it was a list of characters, when in I want it to match anything except this whole string. How do I get this to happen?