Commit 14120a5e authored by Mikaël Salson's avatar Mikaël Salson [:space:] seems more portable than \s

The latter doesn't work on FreeBSD while the former does
parent 61ff3343
......@@ -135,7 +135,7 @@ def should_pattern_to_regex(p):
gene = gene.replace('/', '/?')
if args.ignore_D and ('IGHD' in gene or 'TRBD' in gene or 'TRDD' in gene):
gene = '\S*'
gene = '[^[:space]]*'
allele = '[[:digit:]]*'
if args.ignore_allele:
......@@ -158,7 +158,7 @@ def should_pattern_to_regex(p):
re1 = should_pattern_to_regex(
re2 = '('+should_pattern_to_regex(')'
re3 = should_pattern_to_regex(
regex_pattern = '\s*'.join(x for x in [re1, re2, re3])
regex_pattern = '[[:space:]]*'.join(x for x in [re1, re2, re3])
# We have a parenthesis free expression
for term in p.split():
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment