[PR 61424] std::regex matches right to left, not leftmost longest

Tim Shen timshen91@gmail.com
Sat Jun 7 04:57:00 GMT 2014


Here's a patch that is a little bit "quick & dirty". In BFS mode it's
not trivial to support ECMAScript's
"match from left to right". A quick solution is only using DFS for
ECMAScript. See the patch.

It is possible to support ECMAScript's "left to right" in BFS mode
(re2 does this), but I didn't see an obvious way. We could take a look
at re2.

Bootstrap & tested.

Thank you!


-- 
Regards,
Tim Shen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.patch
Type: text/x-patch
Size: 9783 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140607/d7a7c525/attachment.bin>


More information about the Gcc-patches mailing list