Rethinking Regex
by Alex Martelli
When should you use Regular Expressions (REs) to perform parsing tasks in Python, and when should you prefer something simpler (string operations and methods), or on the other hand something more powerful (specialized and general purpose parsing modules)? When you do pick REs, how best should you use their various methods? This article assumes that you know the basics of REs and gives you context about their best use (and non-use) in Python.