hydra.overlay.python.lib.regex module

Python implementations of hydra.overlay.python.lib.regex primitives.

hydra.overlay.python.lib.regex.find(pattern: str, input: str) → object

Find the first substring matching a regex pattern.

hydra.overlay.python.lib.regex.find_all(pattern: str, input: str) → tuple

Find all non-overlapping substrings matching a regex pattern.

hydra.overlay.python.lib.regex.matches(pattern: str, input: str) → bool

Check whether an entire string matches a regex pattern.

hydra.overlay.python.lib.regex.replace(pattern: str, replacement: str, input: str) → str

Replace the first occurrence of a regex pattern with a replacement string.

hydra.overlay.python.lib.regex.replace_all(pattern: str, replacement: str, input: str) → str

Replace all non-overlapping occurrences of a regex pattern with a replacement string.

hydra.overlay.python.lib.regex.split(pattern: str, input: str) → tuple

Split a string by a regex pattern.