You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For most other regex engines, [X-Y-Z] is a valid character set, consisting of character range X to Y, literal dash -, and character Z. For example, you can verify at https://regex101.com/ that this is valid for all regex flavors it supports.
Currently Boost rejects this under the default syntax. It's not clear from the documentation whether this is valid for Boost. This can be easily fixed by e.g. changing to [X-YZ-] but I'm still interested in knowing if rejecting this is intentional.
terminate called after throwing an instance of 'boost::wrapexcept<boost::regex_error>'
what(): Invalid range end in character class The error occurred while parsing the regular expression: '[0-9->>>HERE>>>#]+'.
Program terminated with signal: SIGSEGV
Proposed fixes
Determine whether we intend to accept or reject such syntax.
If yes, change parsing code accordingly.
In either case, clarify in the documentation
The text was updated successfully, but these errors were encountered:
Summary
For most other regex engines,
[X-Y-Z]
is a valid character set, consisting of character range X to Y, literal dash-
, and character Z. For example, you can verify at https://regex101.com/ that this is valid for all regex flavors it supports.Currently Boost rejects this under the default syntax. It's not clear from the documentation whether this is valid for Boost. This can be easily fixed by e.g. changing to
[X-YZ-]
but I'm still interested in knowing if rejecting this is intentional.I encountered this when migrating from
std::regex
. This is explicitly valid forstd::regex
:https://en.cppreference.com/w/cpp/regex/ecmascript:
Minimal reproducible example
Code
Expected behavior
Returns 1
Actual behavior
Proposed fixes
The text was updated successfully, but these errors were encountered: