Daniel Kutenin
Daniel Kutenin
Does not compile: ```cpp static_assert("\\A((.|QM){1}\\Z)"_ctre.search("QM")); static_assert("\\A((.|(QM)){1}\\Z)"_ctre.search("QM")); ``` Compiles: ```cpp static_assert("\\A((.|QM)\\Z)"_ctre.search("QM")); static_assert("\\A((.|Q){1}\\Z)"_ctre.search("Q")); static_assert("\\A((QM){1}\\Z)"_ctre.search("QM")); static_assert("((.|QM){1}\\Z)"_ctre.search("QM")); static_assert("(\\A(.|QM){1})"_ctre.search("QM")); ``` https://gcc.godbolt.org/z/rfsP6d
I was using CTRE for url finding in the text and apparently found that it does not search everything. Examples The original regex was `R"((?(http://www\.|https://www\.|http://|https://)?[a-zA-Z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(/[^\s]*)?/?\b))"`. I tried to simplify a...
Does not compile ```cpp static_assert("(;(?:((A(.|[\\w]Y)){1,2}))?\\Z)"_ctre.search(";AjYAb")); ``` Compiles: ```cpp static_assert("((?:((A(.|[\\w]Y)){1,2}))?\\Z)"_ctre.search("AjYAb")); ``` https://gcc.godbolt.org/z/TEjEbr https://regex101.com/r/oNZ6ri/1
Hi, while fuzzing I found a compile time error reproduces in the following example ```cpp int main() { using namespace ctre::literals; "[^\\w]*"_ctre.search(""); } ``` ``` contrib/compile-time-regular-expressions/include/ctre/evaluation.hpp:412:16: error: constexpr if condition...
Reproducible example ```cpp #undef NDEBUG #include #include /* Explanation: Failed to scan with hyperscan: HS_UNKNOWN_ERROR Version: 5.4.0 */ int on_match(unsigned int id, unsigned long long from, unsigned long long to,...
Can I pass any number of bytes to hs_deserialize_database and make sure that using it in other functions is memory safe if the call was successful? Some testing showed that's...
This change improves performance for x86 with BMI2 because before we were doing subtraction from 64 to shift but if we move it to bitsLeft, we are going to subtract...