diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index <HASH>..<HASH> 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -3031,7 +3031,7 @@ a..b, a:b, a:, ..b  items by indices (inclusive)
             # get the output out of the buffer
             output = membuf.read()
             # and add the regex-escaped output to the transcript
-            transcript += output.replace('/', '\/')
+            transcript += output.replace('/', r'\/')
 
         # Restore stdout to its original state
         self.stdout = saved_self_stdout
diff --git a/cmd2/transcript.py b/cmd2/transcript.py
index <HASH>..<HASH> 100644
--- a/cmd2/transcript.py
+++ b/cmd2/transcript.py
@@ -106,7 +106,7 @@ class Cmd2TestCase(unittest.TestCase):
             self.assertTrue(re.match(expected, result, re.MULTILINE | re.DOTALL), message)
 
     def _transform_transcript_expected(self, s: str) -> str:
-        """Parse the string with slashed regexes into a valid regex.
+        r"""Parse the string with slashed regexes into a valid regex.
 
         Given a string like:
This just fixes a couple minor lint warnings related to raw strings and escapes