logoalt Hacker News

adzmyesterday at 8:00 PM1 replyview on HN

Is there any reason that RE#'s two-pass approach couldn't be adopted by other regex engines?

Ah, there is a post with more detail about RE# and discussion here recently that I must have missed: https://news.ycombinator.com/item?id=47206647


Replies

ievievyesterday at 8:38 PM

The part that makes it difficult is that it doesn't return the same matches, it returns almost the same matches but not exactly.

But if PCRE semantics isn't set in stone then i hope leftmost longest could be the default some day. There's a lot of nice things you get for free with the two pass approach