mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 18:40:13 -06:00
Fix regexp implementation to work with Unicode characters
After switching from QRegExp to QRegularExpression matching Unicode characters was broken. This functionality is now restored. See issue #2054.
This commit is contained in:
@@ -143,6 +143,7 @@ static void regexp(sqlite3_context* ctx, int /*argc*/, sqlite3_value* argv[])
|
||||
{
|
||||
// Pattern is not in cache. Create a new regular expressions object, compile it, and insert it into the cache
|
||||
regex.setPattern(pattern);
|
||||
regex.setPatternOptions(QRegularExpression::UseUnicodePropertiesOption);
|
||||
if(!regex.isValid())
|
||||
return sqlite3_result_error(ctx, "invalid operand", -1);
|
||||
regex.optimize();
|
||||
|
||||
Reference in New Issue
Block a user