I have a file that includes a bunch of strings like \"size=XXX;\". I am trying python\'s re module for the first time and am a bit mystified by the following behavior: if I
I think what you want is using [] instead of (). [] indicating set of character while () indicating group match. Try something like this:
print re.findall('size=5[01];', myfile)