diff options
author | Zachary Sloan | 2012-11-28 15:09:36 -0600 |
---|---|---|
committer | Zachary Sloan | 2012-11-28 15:09:36 -0600 |
commit | 5278e4b66d3261c8ff114bf4cd0e69307d1ffd5f (patch) | |
tree | ef77cae61e2cbba27971f1fded904e4312d691e6 | |
parent | a47111b7fce834924285d7a89b544c47473ce724 (diff) | |
download | genenetwork2-5278e4b66d3261c8ff114bf4cd0e69307d1ffd5f.tar.gz |
Changed parser to split by ">=" and "<="
-rw-r--r-- | wqflask/wqflask/parser.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/wqflask/wqflask/parser.py b/wqflask/wqflask/parser.py index a94a8842..676efa1e 100644 --- a/wqflask/wqflask/parser.py +++ b/wqflask/wqflask/parser.py @@ -35,8 +35,8 @@ def parse(pstring): items = [] - separators = [re.escape(x) for x in (":", "=", "<", ">")] - separators = '([%s])' % ("".join(separators)) + separators = [re.escape(x) for x in ("<=", ">=", ":", "=", "<", ">")] + separators = '(%s)' % ("|".join(separators)) print("separators:", separators) @@ -69,6 +69,9 @@ if __name__ == '__main__': parse("foo=[3 2 1]") parse("WIKI=ho*") parse("LRS>9") + parse("LRS>=18") + parse("foo <= 2") + parse("cisLRS<20") parse("foo=[3 2 1)") parse("foo=(3 2 1)") parse("shh") |