Regular expressions are text matching patterns described with a
formal syntax. The patterns are interpreted as a set of instructions,
which are then executed with a string as input to produce a matching
subset or modified version of the original. The term “regular
expressions” is frequently shortened to as “regex” or “regexp” in
conversation. Expressions can include literal text matching,
repetition, pattern-composition, branching, and other sophisticated
rules. A large number of parsing problems are easier to solve with a
regular expression than by creating a special-purpose lexer and
parser.
Code Interstices All the little things that happen between bouts of coding. Covering internet technologies, Python, Mac OS X, and open source.
Sunday, September 5, 2010
PyMOTW: re - Regular Expressions
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment