summaryrefslogtreecommitdiff
path: root/pygments/regexopt.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2022-10-27 07:18:16 +0200
committerGeorg Brandl <georg@python.org>2022-10-27 12:15:22 +0200
commit629c448bdcbd7ca9f5d530c0ef10fa3bcd7ccbff (patch)
tree0d16b78a78b188e1f3ef28746b87ada37bdd804e /pygments/regexopt.py
parentcffc5df62c258ca39fc7474f7197f2df33ab014f (diff)
downloadpygments-git-regex.tar.gz
all: convert "re" to "regex"regex
Diffstat (limited to 'pygments/regexopt.py')
-rw-r--r--pygments/regexopt.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pygments/regexopt.py b/pygments/regexopt.py
index ae007919..d711149f 100644
--- a/pygments/regexopt.py
+++ b/pygments/regexopt.py
@@ -9,12 +9,13 @@
:license: BSD, see LICENSE for details.
"""
-import re
-from re import escape
from os.path import commonprefix
from itertools import groupby
from operator import itemgetter
+import regex as re
+from regex import escape
+
CS_ESCAPE = re.compile(r'[\[\^\\\-\]]')
FIRST_ELEMENT = itemgetter(0)