[docs] Python 3.6.4 documentation of re $
knutson at cray.com
Tue Feb 6 14:18:09 EST 2018
>From https://docs.python.org/3.6/library/re.html with English 3.6.4 selected:
Matches the end of the string or just before the newline at the end of the string, and in MULTILINE mode also matches before a newline. ...
I found that a regular expression such as r"Text:([^|]).*$" would include the newline in the match group if there is no "|". The "or just before the newline" in the documentation can be interpreted as requiring a newline to follow the $ and not be included in the match group.
More information about the docs