Lines Matching +full:sub +full:- +full:group
4 # SPDX-License-Identifier: GPL-2.0
28 on such group tree where other symbols are placed.
32 escape_symbols = r"([\x21-\x29\x2b-\x2d\x3a-\x40\x5c\x60\x7b-\x7e])"
34 #: Special group for other nodes.
45 # Temporarily change [0-9]+ type of patterns
46 (re.compile(r"\[0\-9\]\+"), "\xff"),
48 # Temporarily change [\d+-\d+] type of patterns
49 (re.compile(r"\[0\-\d+\]"), "\xff"),
53 # Temporarily change [0-9] type of patterns
54 (re.compile(r"\[(\d)\-(\d)\]"), "\xf4\1-\2\xf5"),
68 (re.compile(r"([^A-Z])[XYZ]([^A-Z])"), "\\1\\\\w\xf7\\2"),
69 (re.compile(r"([^A-Z])[XYZ]$"), "\\1\\\\w\xf7"),
72 # Recover [0-9] type of patterns
88 (re.compile(r"(\d+)\\(-\d+)"), r"\1\2"),
108 re_symbol_name = re.compile(r"(\w|\\[\.\-\:])+$")
110 #: List of popular group names to be skipped to minimize regex group size
116 Get a search group for a subset of regular expressions.
123 them into groups. The smaller the group, the better, as it would
133 a special group (self.leave_others).
165 may match it, based on the sub-groups created by regex_append().
225 new = r.sub(s, new)
228 raise re.PatternError(f"{e}\nwhile re.sub('{r.pattern}', {s}, str)") from e
233 self.log.debug("%-90s <== %s", new, what)