summaryrefslogtreecommitdiff
path: root/effitool
diff options
context:
space:
mode:
Diffstat (limited to 'effitool')
-rwxr-xr-xeffitool8
1 files changed, 8 insertions, 0 deletions
diff --git a/effitool b/effitool
index 4bf5aa6..af1e5ce 100755
--- a/effitool
+++ b/effitool
@@ -22,6 +22,7 @@ import configparser
import http
import json
import os
+import re
import sys
import traceback
import urllib.request
@@ -313,11 +314,18 @@ class ContainsCond(SearchCond):
return pattern in value
+class RegexCond(SearchCond):
+
+ def op(self, value, pattern):
+ return re.search(pattern, value)
+
+
class CondFactory:
_pairs = [
('=', ExactCond),
(':', ContainsCond),
+ ('~', RegexCond),
]
def parse(self, cond):