modernize: raw string literals

This commit is contained in:
Nicolas Werner 2020-02-04 05:19:55 +01:00
parent 7ccc120f63
commit 7dab4d39ee

View file

@ -53,9 +53,9 @@ namespace strings {
const QString url_html = "<a href=\"\\1\">\\1</a>"; const QString url_html = "<a href=\"\\1\">\\1</a>";
const QRegularExpression url_regex( const QRegularExpression url_regex(
// match an URL, that is not quoted, i.e. // match an URL, that is not quoted, i.e.
// vvvvvvv match quote via negative lookahead/lookbehind vvvvvv // vvvvvv match quote via negative lookahead/lookbehind vv
// vvvv atomic match url -> fail if there is a " before or after vv // vvvv atomic match url -> fail if there is a " before or after vvv
"(?<!\")(?>((www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]\\)\\:]))(?!\")"); R"((?<!")(?>((www\.(?!\.)|[a-z][a-z0-9+.-]*://)[^\s<>'"]+[^!,\.\s<>'"\]\)\:]))(?!"))");
} }
// Window geometry. // Window geometry.