diff --git a/Doc/library/re.rst b/Doc/library/re.rst index d49b6b9d06ea24..f54c4303596c22 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -122,7 +122,7 @@ The special characters are: matches both ``'foo'`` and ``'foobar'``, while the regular expression ``foo$`` matches only ``'foo'``. More interestingly, searching for ``foo.$`` in ``'foo1\nfoo2\n'`` - matches ``'foo2'`` normally, but ``'foo1'`` in :const:`MULTILINE` mode; searching + matches ``'foo2'`` normally, but also ``'foo1'`` in :const:`MULTILINE` mode; searching for a single ``$`` in ``'foo\n'`` will find two (empty) matches: one just before the newline, and one at the end of the string. @@ -1601,6 +1601,8 @@ Regular Expression Examples --------------------------- +.. _checking-for-a-pair: + Checking for a Pair ^^^^^^^^^^^^^^^^^^^ @@ -1655,6 +1657,8 @@ To find out what card the pair consists of, one could use the 'a' +.. _simulating-scanf: + Simulating scanf() ^^^^^^^^^^^^^^^^^^ @@ -1742,6 +1746,8 @@ beginning with ``'^'`` will match at the beginning of each line. :: +.. _making-a-phonebook: + Making a Phonebook ^^^^^^^^^^^^^^^^^^ @@ -1803,6 +1809,8 @@ house number from the street name: ['Heather', 'Albrecht', '548.326.4584', '919', 'Park Place']] +.. _text-munging: + Text Munging ^^^^^^^^^^^^ @@ -1823,6 +1831,8 @@ in each word of a sentence except for the first and last characters:: 'Pofsroser Aodlambelk, plasee reoprt yuor asnebces potlmrpy.' +.. _finding-all-adverbs: + Finding all Adverbs ^^^^^^^^^^^^^^^^^^^ @@ -1836,6 +1846,8 @@ the following manner:: ['carefully', 'quickly'] +.. _finding-all-adverbs-and-their-positions: + Finding all Adverbs and their Positions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1852,6 +1864,8 @@ to find all of the adverbs *and their positions* in some text, they would use 40-47: quickly +.. _raw-string-notation: + Raw String Notation ^^^^^^^^^^^^^^^^^^^ @@ -1876,6 +1890,8 @@ functionally identical:: +.. _writing-a-tokenizer: + Writing a Tokenizer ^^^^^^^^^^^^^^^^^^^