How do you extract the original 'raw' string from a Python regex. For example, I have the following simple regex:
import re
test_line_re = re.compile(r'Test \d+ Result: \s+')
I want to be able to print: Test \d+ Result \s+
You can use the pattern attribute:
print test_line_re.pattern
You should always search through the documentation when you have questions like this.