Regular expressions present challenges even for not-so-regular developers
Regular expressions are a concise and powerful tool for processing text. However, they also come with a steep learning curve and plenty of opportunities to make mistakes. This is the first in a series of posts about some specific regex pitfalls. In this series you'll see examples of issues in real code caused by these pitfalls, and strategies (and rules!) for writing better, more readable and maintainable regular expressions. The series starts in this post with pitfalls related to a very common feature of regular expressions: character classes.