diff --git a/CMakeLists.txt b/CMakeLists.txt
index 265c68b4b..c7a67e607 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,14 +6,14 @@ project(NotepadNext
LANGUAGES CXX
)
-set(APP_DISTRIBUTION "" CACHE STRING "Distribution type")
-string(TIMESTAMP CURRENT_YEAR "%Y")
-set(APP_COPYRIGHT "Copyright 2019-${CURRENT_YEAR} Justin Dailey")
-
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
+set(APP_DISTRIBUTION "" CACHE STRING "Distribution type")
+string(TIMESTAMP CURRENT_YEAR "%Y")
+set(APP_COPYRIGHT "Copyright 2019-${CURRENT_YEAR} Justin Dailey")
+
add_compile_definitions(SCI_OWNREGEX)
if(MSVC)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 712a3336f..31cb7b88f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -32,7 +32,7 @@ qt_add_executable(NotepadNext
MacroStepTableModel.h
NotepadNextApplication.h
NppImporter.h
- QRegexSearch.h
+
RangeAllocator.h
RecentFilesListManager.h
RecentFilesListMenuBuilder.h
@@ -79,7 +79,7 @@ qt_add_executable(NotepadNext
main.cpp
NotepadNextApplication.cpp
NppImporter.cpp
- QRegexSearch.cpp
+
RangeAllocator.cpp
RecentFilesListManager.cpp
RecentFilesListMenuBuilder.cpp
@@ -179,6 +179,7 @@ qt_add_executable(NotepadNext
widgets/QuickFindWidget.ui
widgets/StatusLabel.cpp
widgets/StatusLabel.h
+ PCRE2Search.h PCRE2Search.cpp
)
set_target_properties(NotepadNext PROPERTIES
@@ -234,6 +235,7 @@ target_link_libraries(NotepadNext
lexilla
scintilla
uchardet
+ pcre2-8
)
target_compile_definitions(NotepadNext
diff --git a/src/PCRE2Search.cpp b/src/PCRE2Search.cpp
new file mode 100644
index 000000000..04b8807ea
--- /dev/null
+++ b/src/PCRE2Search.cpp
@@ -0,0 +1,326 @@
+/*
+ * This file is part of Notepad Next.
+ * Copyright 2026 Justin Dailey
+ *
+ * Notepad Next is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Notepad Next is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Notepad Next. If not, see .
+ */
+
+
+// TODO: Fix this mess. Scintilla makes you include everything...in the correct order...
+// this was copied from Editor.cxx just to get it to compile
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include