Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Use C++11 std::regex to replace boost::regex? #1813

Open
springmeyer opened this Issue Apr 17, 2013 · 3 comments

Comments

Projects
None yet
3 participants
Owner

springmeyer commented Apr 17, 2013

The question is whether it supports unicode correctly/sufficiently. This may help inform our approach to #1777

Owner

artemp commented Apr 17, 2013

We need to re-evaluate using UTF-8 encoded std::string internally

Owner

springmeyer commented Feb 10, 2014

capturing chat with @artemp:

  • he found std::regex did not support all the syntax of boost::regex - so we need to revisit/assess if this is a problem.
  • but otherwise, and not withstanding some fixmes, this is viable
Contributor

lightmare commented Feb 22, 2017

std::regex can be used for ASCII stuff like matching numbers or identifiers, perhaps also safe to match UTF-8 with no multi-byte characters in square brackets or right before repetitions (they'd have to be parenthesized).

But it can't handle unicode character classes, word boundaries, so for .match/replace operations in expressions std::regex isn't sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment