Lines Matching defs:string
28 def _add_regex(self, string, flags):
32 self.regex = re_cache.get(string, None)
34 self.regex = re.compile(string, flags=flags)
36 re_cache[string] = self.regex
38 def __init__(self, string, cache=True, flags=0):
46 self._add_regex(string, flags)
62 def match(self, string):
67 self.last_match = self.regex.match(string)
70 def search(self, string):
75 self.last_match = self.regex.search(string)
78 def findall(self, string):
83 return self.regex.findall(string)
85 def split(self, string):
90 return self.regex.split(string)
92 def sub(self, sub, string, count=0):
97 return self.regex.sub(sub, string, count=count)
118 string search STRUCT_GROUP(),
128 will ignore the search string.
250 # replaces \1 at the sub string, if \1 is used there
266 # Append the remaining string