Seek and offset regex are less greedy now

This commit is contained in:
Uriziel 2012-12-24 19:57:08 +01:00
parent 5d642ad6d6
commit 4502f400c7

View File

@ -59,8 +59,8 @@ class ConsoleUI(threading.Thread):
return None
def _tryAdvancedCommands(self, data):
o = re.match(r"^(?:o|offset)\ ([+-])?\ ?(.+)$", data)
s = re.match(r"^(?:s|seek)?\ ?([+-])?\ ?(.+)$", data) #careful! s will match o as well
o = re.match(r"^(?:o|offset)\ ([+-])?\ ?(\d+[:\.]?)+$", data)
s = re.match(r"^(?:s|seek)?\ ?([+-])?\ ?(\d+[:\.]?)+$", data) #careful! s will match o as well
if(o):
sign = self._extractRegexSign(o)
t = utils.parseTime(o.group(2))