Regular expressions

This chapter covers

Understanding regular expressions

Creating regular expressions with special


Using raw strings in regular expressions

Extracting matched text from strings

Substituting text with regular expressions

In some sense, we shouldn't discuss regular expressions in this book at all. They're implemented by a single Python module and are advanced enough that they don't even come as part of the standard library in languages like C or Java. But if you're using Python, you're probably doing text parsing; and if you're doing that, then regular expressions are too useful to be ignored. If you use Perl, Tcl, or UNIX, you may be familiar with regular expressions; if not, this chapter will go into them in some detail.

Was this article helpful?

0 0

Post a comment