Character ( Perl ) Class Operation Support #1270
-
The regex crate in Rust is highly performant and well-suited for a wide range of use cases. However, one limitation ( not a serious one, but can be useful in many cases )is the lack of support for character class set operations, such as union, intersection, and subtraction (e.g., [a-z&&[^aeiou]]). These features are supported in several other regex engines (e.g., Java, PCRE) and allow for more expressive and concise pattern definitions. Their absence in Rust's regex engine can make certain patterns more cumbersome to express and may require additional logic or preprocessing to work around. Given the crate’s focus on performance and correctness, it would be valuable to understand whether support for character class operations is planned or has been intentionally omitted due to technical or design constraints. Any insights or updates on this limitation would be greatly appreciated. Thank you for the excellent work on maintaining such a robust and efficient regex engine. Reference - PCRE2 Project Syntax Page ( The operator section is a little down ) And to be honest, I've made a module which really does it, but the problem is, it does it in a different AST structure defined by me. Well I'm most willing to share it. Yours Faithfully, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Beta Was this translation helpful? Give feedback.
This has been supported for years.