compile-time-regular-expressions
compile-time-regular-expressions copied to clipboard
Compile Time Regular Expression in C++
Hello. I have the following regex: ```c++ #include "ctll/fixed_string.hpp" #include "ctre.hpp" static constexpr auto ptv_regex = ctll::fixed_string( "^(\\d+)(?:[vV](\\d+))?[Pp][Tt][Vv](?:(\\d+)|(\\d+)([AaBbCc]?))?(!)?(?:$|\\^(.+))" ); ``` which I try to match using: ```c++ auto found =...
I have added some basic functionality for compile-time manipulation such as find, count, split and replace. If this poll request is accepted I will try to add compile-time regex::replace too.
I'm getting an internal compiler error on MSVC with the current code in trunk: https://godbolt.org/z/jexjEsj61 ``` https://raw.githubusercontent.com/hanickadot/compile-time-regular-expressions/5b914a62c71c6c6b336fd466a4e812db635b9fdc/single-header/ctre.hpp(5114): fatal error C1001: Internal compiler error. (compiler file 'd:\a01\_work\49\s\src\vctools\Compiler\CxxFE\sl\p1\c\constexpr\constexpr.cpp', line 8618) To work...
CTRE doesn't seem to support _lookbehind_ rules, like `(?(s); } static_assert(a_not_preceded_by_b("xa")); static_assert(!a_not_preceded_by_b("ba")); ``` Is this a known issue? The _lookahead_ expressions `(?=x)` and `(?!x)` seem to work though.
When I execute the make command, the package contains the following error. Can you give me some help? In addition, the version I tested was 3.6 ``` root@simon28li spack-src]# make...
Apparently a new feature in clang which guarantees the tail call optimization, may help optimize debug builds. Not sure if this produces different results than __forceinline, may be something to...
Regex iterator in C++20 may be a coroutine-generator, isnt it better then returning a range? What about fast_match (only checks match or not) ?
Say, I have a string ``` char8_t text[] = u8"• test\n - two\n •• three\n-• four\n"; ``` I would like to substitute any number of consecutive blank characters, `-`, or...
We are trying to [package `ctre` for `build2`](https://github.com/build2-packaging/compile-time-regular-expressions) where, in order to allow multiple libraries to co-exist, we have rules a bit stricter than "install whatever you want anywhere you...
There is a check for CTLL_CNTTP_COMPILER_CHECK, which hasn't been defined yet. ```C++ #if CTLL_CNTTP_COMPILER_CHECK #define CTLL_FIXED_STRING ctll::fixed_string #else #define CTLL_FIXED_STRING const auto & #endif #endif #ifndef CTLL__TYPE_STACK__HPP #define CTLL__TYPE_STACK__HPP #ifndef...