Commits

Georg Brandl committed e26331b

Improve matching of q-operators in Perl.

Comments (0)

Files changed (1)

pygments/lexers/agile.py

             (r'(q|qq|qw|qr|qx)\(', String.Other, 'rb-string'),
             (r'(q|qq|qw|qr|qx)\[', String.Other, 'sb-string'),
             (r'(q|qq|qw|qr|qx)\<', String.Other, 'lt-string'),
-            (r'(q|qq|qw|qr|qx)(.)[.\n]*?\1', String.Other),
+            (r'(q|qq|qw|qr|qx)([^a-zA-Z0-9])(.|\n)*?\2', String.Other),
             (r'package\s+', Keyword, 'modulename'),
             (r'sub\s+', Keyword, 'funcname'),
             (r'(\[\]|\*\*|::|<<|>>|>=|<=|<=>|={3}|!=|=~|'
             (r'\\', String.Other),
             (r'\<', String.Other, 'lt-string'),
             (r'\>', String.Other, '#pop'),
-            (r'[^\<\>]]+', String.Other)
+            (r'[^\<\>]+', String.Other)
         ],
         'end-part': [
             (r'.+', Comment.Preproc, '#pop')