using re.match and re.groupdict() to parse long lines with parentheses in input. These are raw r'strings'
, but the parentheses in the input result in a no match. When i take out the parentheses from the fake input, the re works. Since these are raw strings, what is the best way to handle this, removing the parentheses from the input is not really a good option.
Asked
Active
Viewed 79 times
0
-
post an ex along with expected output. – Avinash Raj Jan 29 '16 at 01:29
-
Parentheses are regexp operators, you have to escape them if you want to match them literally. – Barmar Jan 29 '16 at 01:34
-
1Read a good regexp tutorial, it will tell you which characters are special. – Barmar Jan 29 '16 at 01:34