skip to navigation
skip to content

Not Logged In

regexlint 1.4

Linter for (Pygments) regular expressions

Regexlint will examine all regular expressions in an importable Pygments lexer, and report things that are probably not doing what you think they’re doing. For example, patterns like this (which will only match the first):


It can also warn about a few syntax problems, for example this has two problems – the \s+ outside the groups, and not enough actions in bygroups (this one needs two in the args to bygroups):

(r'(foo)\s+(bar)', bygroups(Blah)),


make demo
regexlint pygments.lexers.web:HtmlLexer
python2 regexlint/ pygments.lexers.web


  • Figure out which phase should remove unnecessary backslashes
  • Write the alternation expander, so that ([ax]|a[bc]) fails the alternation order checks
  • Make more general than just for Pygments


This project is licensed under the Apache Public License, see COPYING

File Type Py Version Uploaded on Size
regexlint-1.4.tar.gz (md5) Source 2014-04-14 18KB
  • Downloads (All Versions):
  • 10 downloads in the last day
  • 86 downloads in the last week
  • 311 downloads in the last month