Latest Tweets:

Debugging regular expressions in Python

Regular expressions are annoying. I just discovered a gem within NLTK (the Natural Language Toolkit) for the Python programming language. It has it’s own regexp debugger:

>>> import nltk
>>> nltk.re_show("a", "I hate regular expressions")
I h{a}te regul{a}r expressions