def do_pattern_match(self,
                      regex,
                      contents=None,
                      match_all=None,
                      match_until=None,
                      match_greedy=None):
     contents = self.template(contents, self.ds) or self.template(
         "{{ contents }}", self.ds)
     parser = parser_loader.get('pattern_match', contents)
     return parser.match(regex, match_all, match_until, match_greedy)
示例#2
0
 def do_pattern_match(self, regex, content=None, match_all=None, match_until=None, match_greedy=None):
     content = self.template(content, self.ds) or self.template("{{ content }}", self.ds)
     parser = parser_loader.get('pattern_match', content)
     return parser.match(regex, match_all, match_until, match_greedy)