You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Merge pull request #927 from OpenShot/caption-regex-for-numbers
Fixing caption regex to support numeric-only captions
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user