Expression | Description |
---|---|
( re ) | Parentheses can be used to override precedence rules. |
re re | A regular expression can be concatenated with another. |
re | re | Match either re. |
re + | Specify that re be matched one or more times. |
re * | Specify that re be matched zero or more times. |
re ? | Specify that re be matched zero or one times. |
. | Matches any character other than newline. |
Regular expression primitives are either characters, escaped characters
or character classes. Most characters can be given directly. Special
characters such as quote, question mark and vertical bar must be escaped
with a backslash (eg. \?
for question mark) to prevent them from being
interpretted as regular expression operators. The newline, tab, carriage
return and NUL characters are specified with \n
, \t
,
\r
and \0
respectively.
See the PyGgy Home Page.