1. Home
  2. Computing & Technology
  3. Python
Python Blog

From Al Lukaszewski, for About.com

Debugging Regular Expressions (RegEx)

Wednesday December 31, 2008
Mastering regular expressions (aka regex) is one of the more challenging areas of programming. Using regex falls into two parts: pattern matching and exclusions. Pattern matching is by far the easiest - you simply derive the pattern from the sample that you would match. It is, however, much harder to match a pattern and only that pattern - excluding false positives.

A major help in controlling regular expressions is Kodos, a regular expression tester written in Python. This is good for when you have a regex to test, but you can expedite the process even further by ensuring you test well-developed regular expressions to begin with. Check out the following guides for developing regular expressions that work well the first time around:
Explore Python
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Python

©2009 About.com, a part of The New York Times Company.

All rights reserved.