Skip to content

Commit f72cc7a

Browse files
committed
clarify '\g<id>' syntax.
1 parent 222fa9b commit f72cc7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cheatsheet.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Special sequences::
4040
\W Non-alphanumeric
4141
\Z End of string
4242

43-
\g<id> Match previous named or numbered group,
44-
e.g. \g<0> or \g<name>
43+
\g<id> Match previous group, '<' & '>' are literal
44+
e.g. \g<0> or \g<name> (not \g0 or \gname)
4545

4646
Special character escapes are much like those already escaped in Python string
4747
literals. Hence regex '``\n``' is same as regex '``\\n``'::

0 commit comments

Comments
 (0)