Created
March 27, 2012 13:16
-
-
Save msmhrt/2215737 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RE_PERLQQ_META = re.compile(r'''(?x) | |
\\(?: (?P<special>[nrt\\@$]) | |
| (?P<octal>[0-3][0-7][0-7]|[0-7][0-7]|[0-7]) | |
| x(?: (?P<hex>[0-9a-fA-F]{2}) | |
| \{(?P<bracketed_hex>[0-9a-fA-F]{2,4})\} | |
) | |
| N\{(?: U\+(?P<unicode>[0-9a-fA-F]{4}) | |
| (?P<unicode_name>[-A-Z0-9 ]*) | |
)\} | |
) | |
| \$(?: (?P<group>&|0|[1-9][0-9]*) | |
| (?P<span>[-+]\[(?P<span_group>0|[1-9][0-9]*)\]) | |
| (?P<last_group1>\+)(?:\{(?P<named_group>[a-zA-Z_][a-zA-Z0-9_]*)\})? | |
| \{(?P<val>[a-zA-Z]+)\} | |
| (?P<last_group2>\^N) | |
) | |
| @(?P<groups>[-+]) | |
''') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment