Пример #1
0
 def test_extract_all_named_capture_group(self):
     self.assertEqual(
         r' | extend extract_all(@"(?P<first>[\da-f]{2})", dynamic(["first", 3]), stringField)',
         Query().extend(f.extract_all(r"(?P<first>[\da-f]{2})", t.stringField, ["first", 3])).render()
     )
Пример #2
0
 def test_extract_all_compiled_pattern(self):
     pat = re.compile(r"([\da-f]{2})")
     self.assertEqual(
         r' | extend extract_all(@"([\da-f]{2})", stringField)',
         Query().extend(f.extract_all(pat, t.stringField)).render()
     )
Пример #3
0
 def test_extract_all(self):
     self.assertEqual(
         r' | extend extract_all(@"([\da-f]{2})", stringField)',
         Query().extend(f.extract_all(r"([\da-f]{2})", t.stringField)).render()
     )