Interestingly, running a second time causes the warning to go away, so one doesn't notice this the first time the code is run.
According to re,
If you’re not using a raw string to express the pattern, remember that Python also uses the backslash as an escape sequence in string literals; if the escape sequence isn’t recognized by Python’s parser, the backslash and subsequent character are included in the resulting string. However, if Python would recognize the resulting sequence, the backslash should be repeated twice. This is complicated and hard to understand, so it’s highly recommended that you use raw strings for all but the simplest expressions.
This PR changes the compiled regexp code into raw strings so that this warning is fixed.
This PR makes the use of raw strings for compiled regexp. When first running
gwtrigfind
, I found the warning:Interestingly, running a second time causes the warning to go away, so one doesn't notice this the first time the code is run.
According to
re
,This PR changes the compiled regexp code into raw strings so that this warning is fixed.