E. Regular Expressions

Warning!

Entire books have been written on this topic. Rather that attempt to cover the content of a book in a few pages, this primer hopes to introduce the material and provide the absolute least amount of knowledge needed to get started with Django Unleashed. I recommend using a full reference when programming or if any of this information proves to be unclear.

A regular expression answers a binary question: Does this string meet a set of requirements? These requirements are created by regular expression patterns. A regular expression pattern will either match (true) or reject (false) a string. These patterns look arcane but are actually quite simple.

Imagine we have a list of first names mixed in with pseudonyms, ...

Get Django Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.