This question is about matching previously defined groups in python...but it is not quite as simple as that.
Here is the text that I want to match:
Figure 1: Converting degraded weaponry to research materials.
Converting degraded weaponry to research
materials.
Here is my regular expression:
(Figure )(\d)(\d)?(: )(?P<description>.+)(\n\n)(?P=description)
Now, the problem with what I currently have is that the regular expression fails to match the text because of the linefeed that appears after "research" on the third line. I want python to ignore linefeeds when matching the previous group to my string.