From 287fd7f0cf871348bb85b77d49e9b3e618e48dfc Mon Sep 17 00:00:00 2001 From: sulyi Date: Sat, 26 Nov 2016 01:16:58 +0100 Subject: [PATCH] [jsinterp] Simpler string regex --- youtube_dl/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 548ce12e2..34c16d95a 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -2110,8 +2110,8 @@ def js_to_json(code): return '"%s"' % v return re.sub(r'''(?sx) - "(?:[^"\\]*(?:\\\\|\\['"nurtbfx/\n]))*[^"\\]*"| - '(?:[^'\\]*(?:\\\\|\\['"nurtbfx/\n]))*[^'\\]*'| + "(?:[^'\\]|\\['"nurtbfx/\\])*"| + '(?:[^"\\]|\\['"nurtbfx/\\])*'| ,(?=(?:\s|(?:/\*(?:(?!\*/)(?:\n|.))*\*/))*[\]}])| /\*(?:(?!\*/)(?:\n|.))*\*/|[a-zA-Z_][.a-zA-Z_0-9]*| \b(?:0[xX][0-9a-fA-F]+|0+[0-7]+)(?:\s*:)?|