uhop / node-re2

node.js bindings for RE2: fast, safe alternative to backtracking regular expression engines.
Other
489 stars 53 forks source link

String replace using RE2 for end of line "$" with "g" flag behaves incorrectly #123

Closed CagdasBayram-at closed 2 years ago

CagdasBayram-at commented 2 years ago

"foo".replace(new RE2("$", "g"), "END") yields ENDfENDoENDoEND The expectation per RE2 is fooEND

uhop commented 2 years ago

It looks like a problem with the underlying library. I will investigate more.

uhop commented 2 years ago

Nope, it is my bug.

CagdasBayram-at commented 2 years ago

Thank you Eugene!

uhop commented 2 years ago

Published as 1.17.3.