diff options
author | ptmcg <ptmcg@austin.rr.com> | 2020-01-26 19:05:23 -0600 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2020-01-26 19:05:23 -0600 |
commit | 40cbbf34a62d023fc52a5e2571b01e726856eac2 (patch) | |
tree | 46f60d94d47a051362afe7211cf122900bc3f90e /pyparsing/util.py | |
parent | 1c57a6d4bd8351ed047691226286cd86c4d999a2 (diff) | |
download | pyparsing-git-40cbbf34a62d023fc52a5e2571b01e726856eac2.tar.gz |
Added new warning 'warn_on_match_first_with_lshift_operator' to warn when doing `fwd << a | b`; fixed potential FutureWarning when including unescaped '[' in a regex range definition.
Diffstat (limited to 'pyparsing/util.py')
-rw-r--r-- | pyparsing/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyparsing/util.py b/pyparsing/util.py index 376b9ae..468fefc 100644 --- a/pyparsing/util.py +++ b/pyparsing/util.py @@ -145,7 +145,7 @@ def _collapseAndEscapeRegexRangeChars(s): is_consecutive.value = -1 def escape_re_range_char(c): - return "\\" + c if c in r"\^-]" else c + return "\\" + c if c in r"\^-][" else c ret = [] for _, chars in itertools.groupby(sorted(s), key=is_consecutive): |