June 2002
Beginner to intermediate
640 pages
14h 24m
English
The sections that follow describe the syntax, use, and arguments of regular expression object methods and properties.
<re object>.search (string[, pos][, endpos])
| Flag | Behavior | Example |
|---|---|---|
| I (IGNORECASE) | Ignore case when searching. |
search("^exam","Example",I)
returns a match object
search("^exam","Example")
returns None
|
| L (LOCALE) | The metacharacters \w, \W, \b,\B are made to fit the currentlocale. | |
| M (MULTILINE) | The metacharacter ^ matches at the beginning of the string and just after each newline character. The $ metacharacter matches at the end of the string and just before each newline character (by default ^ matches only at the beginning of ... |
Read now
Unlock full access