[regex] ECMAScript support?
[sorry if this mail comes twice, I think my first mail was eaten...] Hello, from what I read it seems that boost.regex supports ECMAScript style regular expression. I already use a RE engine (that of Perl built inside wxWidgets), but i'm not really happy with it because it is not ECMA compliant and prevents me from searching in both UTF8 and wchar_t strings and it does not have iterator oriented searches. So my questions: - is boost.regex totally compliant with ECMAScript RE? or at least more than Perl engine? [1.33.1 vs. 1.34 ?] - did I understand well that I can use iterators and have both UTF8 (char*) and wchar_t searches in the same executable build? (thanks to their template nature?) Best regards Armel
Armel Asselin wrote:
So my questions: - is boost.regex totally compliant with ECMAScript RE? or at least more than Perl engine? [1.33.1 vs. 1.34 ?]
I believe so, if there's anything missing from 1.34 let me know.
- did I understand well that I can use iterators and have both UTF8 (char*) and wchar_t searches in the same executable build? (thanks to their template nature?)
Iterators yes, no problem. As for character types you can use: boost::regex with narrow characters, but not really with multibyte sequences. boost::wregex with wchar_t sequences. boost::u32regex with any of UTF8, UTF16 or UTF32 sequences (they all get converted to 32-bit code points on the fly), but you will need ICU to provide the Unicode character database. See http://www.boost.org/libs/regex/doc/icu_strings.html for the docs. HTH, John.
participants (2)
-
Armel Asselin
-
John Maddock