summaryrefslogtreecommitdiff
path: root/pyparsing/util.py
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2020-03-29 19:37:18 -0500
committerptmcg <ptmcg@austin.rr.com>2020-03-29 19:37:18 -0500
commitfcbad044c73a0c4006edd34e5586d8a60774ddf4 (patch)
tree67116b88f005123d6cf7b40d35d6e68d56d37377 /pyparsing/util.py
parent96fe2688898c1846ea97e2039659b98ed6f71e4e (diff)
downloadpyparsing-git-fcbad044c73a0c4006edd34e5586d8a60774ddf4.tar.gz
Fix potential FutureWarning with generated regex; minor reformat of runTests output to break at test comments if any
Diffstat (limited to 'pyparsing/util.py')
-rw-r--r--pyparsing/util.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pyparsing/util.py b/pyparsing/util.py
index a80a6d3..0d5af76 100644
--- a/pyparsing/util.py
+++ b/pyparsing/util.py
@@ -43,7 +43,7 @@ def col(loc, strg):
Note: the default parsing behavior is to expand tabs in the input string
before starting the parsing process. See
:class:`ParserElement.parseString` for more
- information on parsing strings containing ``<TAB>``\ s, and suggested
+ information on parsing strings containing ``<TAB>`` s, and suggested
methods to maintain a consistent view of the parsed string, the parse
location, and line and column positions within the parsed string.
"""
@@ -57,7 +57,7 @@ def lineno(loc, strg):
Note - the default parsing behavior is to expand tabs in the input string
before starting the parsing process. See :class:`ParserElement.parseString`
- for more information on parsing strings containing ``<TAB>``\ s, and
+ for more information on parsing strings containing ``<TAB>`` s, and
suggested methods to maintain a consistent view of the parsed string, the
parse location, and line and column positions within the parsed string.
"""
@@ -126,8 +126,8 @@ class _FifoCache:
def _escapeRegexRangeChars(s):
- # ~ escape these chars: ^-]
- for c in r"\^-]":
+ # escape these chars: ^-[]
+ for c in r"\^-[]":
s = s.replace(c, _bslash + c)
s = s.replace("\n", r"\n")
s = s.replace("\t", r"\t")