diff --git a/Elwig/Windows/QueryWindow.xaml.cs b/Elwig/Windows/QueryWindow.xaml.cs index a26bd8e..6bcc98b 100644 --- a/Elwig/Windows/QueryWindow.xaml.cs +++ b/Elwig/Windows/QueryWindow.xaml.cs @@ -3,6 +3,7 @@ using Microsoft.Data.Sqlite; using System; using System.Collections.Generic; using System.Data.Common; +using System.Text.RegularExpressions; using System.Windows; using System.Windows.Controls; using System.Windows.Data; @@ -26,6 +27,7 @@ namespace Elwig.Windows { IList header; using (var cnx = new SqliteConnection(AppDbContext.ConnectionString)) { + cnx.CreateFunction("REGEXP", (pattern, value) => value == null ? null : Regex.Match(value, pattern).Success, true); cnx.Open(); var cmd = cnx.CreateCommand(); cmd.CommandText = sqlQuery;