summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Crapo <jared@kotfu.net>2017-08-22 11:32:29 -0600
committerJared Crapo <jared@kotfu.net>2017-08-22 11:32:29 -0600
commit6ff0def7c35a29031ac3ca7e8ba580e971633c6c (patch)
tree5b5b16cd5a129d5951eda905b4fe98d3fe00da0c
parente3f88038367d6c6ec617ddc84dfcdb91f0dceccf (diff)
downloadcmd2-git-6ff0def7c35a29031ac3ca7e8ba580e971633c6c.tar.gz
Clarify warnings about whitespace
-rw-r--r--docs/transcript.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/transcript.rst b/docs/transcript.rst
index c54c807e..f1e3e63f 100644
--- a/docs/transcript.rst
+++ b/docs/transcript.rst
@@ -79,11 +79,10 @@ ensure that ``we`` or ``go`` or ``to`` appear in the output, but it does work if
mumble happens to add words to the beginning or the end of the output.
Since the output could be multiple lines long, ``cmd2`` uses multiline regular
-expression matching, and also uses the ``DOTALL`` flag, which subtly changes
-the behavior of commonly used special characters like ``.``, ``^`` and ``$``,
-so you may want to double check the `Python regular expression documentation
-<https://docs.python.org/3/library/re.html>`_. You also need to be careful when
-using ``\Z``, it matches after the newline at the end of the string.
+expression matching, and also uses the ``DOTALL`` flag. These two flags subtly
+change the behavior of commonly used special characters like ``.``, ``^`` and
+``$``, so you may want to double check the `Python regular expression
+documentation <https://docs.python.org/3/library/re.html>`_.
If your output has slashes in it, you will need to escape those slashes so the
stuff 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::
If you are using regular expressions, be aware that depending on how you
write your regex, the newlines after the regex may or may not matter.
+ ``\Z`` matches *after* the newline at the end of the string, whereas
+ ``$`` matches the end of the string *or* just before a newline.
Running a transcript