MCPcopy Create free account
hub / github.com/EasyIME/PIME / re_unescape

Function re_unescape

python/python3/tornado/util.py:209–218  ·  view source on GitHub ↗

r"""Unescape a string escaped by `re.escape`. May raise ``ValueError`` for regular expressions which could not have been produced by `re.escape` (for example, strings containing ``\d`` cannot be unescaped). .. versionadded:: 4.4

(s: str)

Source from the content-addressed store, hash-verified

207
208
209def re_unescape(s: str) -> str:
210 r"""Unescape a string escaped by `re.escape`.
211
212 May raise ``ValueError`` for regular expressions which could not
213 have been produced by `re.escape` (for example, strings containing
214 ``\d`` cannot be unescaped).
215
216 .. versionadded:: 4.4
217 """
218 return _re_unescape_pattern.sub(_re_unescape_replacement, s)
219
220
221class Configurable(object):

Callers 3

_find_groupsMethod · 0.90
test_re_unescapeMethod · 0.90

Calls

no outgoing calls