From a3ead041e098ccf3f0118aa653542580ea10b9f6 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 18 May 2023 17:39:42 -0500 Subject: [PATCH] Fixing caption regex to support numeric-only captions --- src/effects/Caption.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/effects/Caption.cpp b/src/effects/Caption.cpp index 61d6b70a..eb723307 100644 --- a/src/effects/Caption.cpp +++ b/src/effects/Caption.cpp @@ -91,7 +91,7 @@ void Caption::process_regex() { } // Parse regex and find all matches (i.e. 00:00.000 --> 00:10.000\ncaption-text) - QRegularExpression allPathsRegex(QStringLiteral("(\\d{2})?:*(\\d{2}):(\\d{2}).(\\d{2,3})\\s*-->\\s*(\\d{2})?:*(\\d{2}):(\\d{2}).(\\d{2,3})([\\s\\S]*?)(.*?)(?=\\d{2}.\\d{2,3}|\\Z)"), QRegularExpression::MultilineOption); + QRegularExpression allPathsRegex(QStringLiteral("(\\d{2})?:*(\\d{2}):(\\d{2}).(\\d{2,3})\\s*-->\\s*(\\d{2})?:*(\\d{2}):(\\d{2}).(\\d{2,3})([\\s\\S]*?)(.*?)(?=\\d{2}:\\d{2,3}|\\Z)"), QRegularExpression::MultilineOption); QRegularExpressionMatchIterator i = allPathsRegex.globalMatch(caption_prepared); while (i.hasNext()) { QRegularExpressionMatch match = i.next();