@@ -79,11 +79,10 @@ ensure that ``we`` or ``go`` or ``to`` appear in the output, but it does work if
7979mumble happens to add words to the beginning or the end of the output.
8080
8181Since the output could be multiple lines long, ``cmd2 `` uses multiline regular
82- expression matching, and also uses the ``DOTALL `` flag, which subtly changes
83- the behavior of commonly used special characters like ``. ``, ``^ `` and ``$ ``,
84- so you may want to double check the `Python regular expression documentation
85- <https://docs.python.org/3/library/re.html> `_. You also need to be careful when
86- using ``\Z ``, it matches after the newline at the end of the string.
82+ expression matching, and also uses the ``DOTALL `` flag. These two flags subtly
83+ change the behavior of commonly used special characters like ``. ``, ``^ `` and
84+ ``$ ``, so you may want to double check the `Python regular expression
85+ documentation <https://docs.python.org/3/library/re.html> `_.
8786
8887If your output has slashes in it, you will need to escape those slashes so the
8988stuff between them is not interpred as a regular expression. In this transcript::
@@ -123,6 +122,8 @@ the path instead of specifying it verbatim, or we can escape the slashes::
123122
124123 If you are using regular expressions, be aware that depending on how you
125124 write your regex, the newlines after the regex may or may not matter.
125+ ``\Z `` matches *after * the newline at the end of the string, whereas
126+ ``$ `` matches the end of the string *or * just before a newline.
126127
127128
128129Running a transcript
0 commit comments