From 782b1b5bd1cdaaead6865dee5d300486e7dd8348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Sat, 19 Mar 2016 11:42:35 +0100 Subject: [utils] lookup_unit_table: Match word boundary instead of end of string --- youtube_dl/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube_dl') diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index bad1c4ea8..067b8a184 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1346,7 +1346,7 @@ def format_bytes(bytes): def lookup_unit_table(unit_table, s): units_re = '|'.join(re.escape(u) for u in unit_table) m = re.match( - r'(?P[0-9]+(?:[,.][0-9]*)?)\s*(?P%s)$' % units_re, s) + r'(?P[0-9]+(?:[,.][0-9]*)?)\s*(?P%s)\b' % units_re, s) if not m: return None num_str = m.group('num').replace(',', '.') -- cgit v1.2.3