Merge pull request #72 from L0ric0/master
fix start and end positions of match in RegexArgument
This commit is contained in:
commit
6f37f914e9
@ -284,8 +284,8 @@ class RegexArgument(Argument):
|
|||||||
val = val.split(" ")[0]
|
val = val.split(" ")[0]
|
||||||
match = self.regex.match(val)
|
match = self.regex.match(val)
|
||||||
if match:
|
if match:
|
||||||
return (orig_val[:match.pos] + orig_val[match.endpos:],
|
return (orig_val[:match.start()] + orig_val[match.end():],
|
||||||
match.groups() or val[match.pos:match.endpos])
|
match.groups() or val[match.start():match.end()])
|
||||||
return orig_val, None
|
return orig_val, None
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user