core: Move regex from stdlib to re2 (#8736)
Moves the regex handling from stdlib to re2
This commit is contained in:
parent
dab50b3ef3
commit
e06b520427
9 changed files with 41 additions and 63 deletions
|
|
@ -1,3 +1,5 @@
|
|||
#include <re2/re2.h>
|
||||
|
||||
#include <any>
|
||||
#include <bit>
|
||||
#include <string_view>
|
||||
|
|
@ -1601,13 +1603,13 @@ PHLWINDOW CWindow::getSwallower() {
|
|||
}
|
||||
|
||||
if (!(*PSWALLOWREGEX).empty())
|
||||
std::erase_if(candidates, [&](const auto& other) { return !std::regex_match(other->m_szClass, std::regex(*PSWALLOWREGEX)); });
|
||||
std::erase_if(candidates, [&](const auto& other) { return !RE2::FullMatch(other->m_szClass, *PSWALLOWREGEX); });
|
||||
|
||||
if (candidates.size() <= 0)
|
||||
return nullptr;
|
||||
|
||||
if (!(*PSWALLOWEXREGEX).empty())
|
||||
std::erase_if(candidates, [&](const auto& other) { return std::regex_match(other->m_szTitle, std::regex(*PSWALLOWEXREGEX)); });
|
||||
std::erase_if(candidates, [&](const auto& other) { return RE2::FullMatch(other->m_szTitle, *PSWALLOWEXREGEX); });
|
||||
|
||||
if (candidates.size() <= 0)
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue