RE
Abbr
RE stands for regular expression.
Introduction
RE can match patterns with an expression only by a string.
RE in Python
You can use the module re.
Notice in Python
Nested sets and set operations
It’s not possible to support both simple sets, as used in the re module, and nested sets at the same time because of a difference in the meaning of an unescaped "[" in a set.
For example, the pattern [[a-z]--[aeiou]] is treated in the version 0 behaviour (simple sets, compatible with the re module) as:
Set containing “[” and the letters “a” to “z”
Literal “–”
Set containing letters “a”, “e”, “i”, “o”, “u”
Literal “]”
but in the version 1 behaviour (nested sets, enhanced behaviour) as:
Set which is:
Set containing the letters “a” to “z”
but excluding:
Set containing the letters “a”, “e”, “i”, “o”, “u”
Version 0 behaviour: only simple sets are supported.
Version 1 behaviour: nested sets and set operations are supported.