1. Tech

Your suggestion is on its way!

An email with a link to:


was emailed to:

Thanks for sharing About.com with others!

Python Regular Expressions (regex): Forming a Regular Expression in Python


1 of 10

Half the Battle: How Python Understand Regular Expressions

Half the battle in writing a good regular expression (regex) is understanding how the computer -- not just the Python interpreter -- reads it. The basic process for understanding this has three parts to it:

  1. Understanding how a computer reads and recognizes character strings in general
  2. Understanding how it understands meta-characters and regular expression symbols
  3. Understanding how to combine those characters and symbols into meaningful expressions to match a group of strings
Explore Python
By Category
    pythonPythoncomputeTechb950ef0206030330f300137fb950ef020611a030f300074ahttp://python.about.comod526F6F7420057terminatedAl LukaszewskipythonguideLq80001DzNIP11970-01-0110/od/index.htm0526F6F741approved/od
  1. About.com
  2. Tech
  3. Python
  4. Regular Expressions
  5. Python Regular Expressions (regex): Forming a Regular Expression in Python - About Python

©2016 About.com. All rights reserved.