MCPcopy Create free account
hub / github.com/sqlmapproject/sqlmap / _re_flatten

Function _re_flatten

thirdparty/bottle/bottle.py:280–286  ·  view source on GitHub ↗

Turn all capturing groups in a regular expression pattern into non-capturing groups.

(p)

Source from the content-addressed store, hash-verified

278
279
280def _re_flatten(p):
281 """ Turn all capturing groups in a regular expression pattern into
282 non-capturing groups. """
283 if '(' not in p:
284 return p
285 return re.sub(r'(\\*)(\(\?P<[^>]+>|\((?!\?))', lambda m: m.group(0) if
286 len(m.group(1)) % 2 else m.group(1) + '(?:', p)
287
288
289class Router(object):

Callers 2

__init__Method · 0.85
addMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…