MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / _compile_regex

Function _compile_regex

web/pgadmin/utils/sqlautocomplete/prioritization.py:10–14  ·  view source on GitHub ↗
(keyword)

Source from the content-addressed store, hash-verified

8
9
10def _compile_regex(keyword):
11 # Surround the keyword with word boundaries and replace interior whitespace
12 # with whitespace wildcards
13 pattern = "\\b" + white_space_regex.sub(r"\\s+", keyword) + "\\b"
14 return re.compile(pattern, re.MULTILINE | re.IGNORECASE)
15
16
17class PrevalenceCounter:

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected