News for hackers. Stuff that matters.
Re:Regex Engine Internals as a Library by kccqzy on Wednesday July 05, 2023 @03:07PM (#36605506)
The C++ standard library std::basic_regex attempts to do this by exposing a templated class over a custom character type. https://en.cppreference.com/w/cpp/regex/basic_regex You can provide your own trait class to define things for your custom "characters".

Unfortunately performance goes out of the window. And it's likely to work as well as storing arbitrary non-character things into a custom std::basic_string.

Re:Regex Engine Internals as a Library by kzrdude on Friday July 07, 2023 @03:52PM (#36637422)
basic_regex seems to be for characters and not arbitrary objects like was asked for, I think.