Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Doc/howto/regex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ You can match the characters not listed within the class by :dfn:`complementing`
the set. This is indicated by including a ``'^'`` as the first character of the
class. For example, ``[^5]`` will match any character except ``'5'``. If the
caret appears elsewhere in a character class, it does not have special meaning.
For example: ``[5^]`` will match either a ``'5'`` or a ``'^'``.
For example: ``[5^]`` will match either a ``'5'`` or a ``'^'``. The behaviour of
``'^'`` outside of a character class will be introduced in
section :ref:`more-metacharacters`.


Perhaps the most important metacharacter is the backslash, ``\``. As in Python
string literals, the backslash can be followed by various characters to signal
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update regex howto to note ^ outside of character classes will not just match literal ^