PCRE in JavaScript under Node

    There are a number of differences between regular expressions in JavaScript and PCRE regular expressions (used in Perl and PHP), the most important of which is probably the lack of lookbehind (retrospective validation) in JavaScript.

    A natural task for programmers annoyed by these differences is to embed PCRE in JavaScript.

    On the Node engine by the end of January, Brian White (Brian White) I solved this problem by creating a module node-pcre , serving a wrapper around the PCRE engine.

    This can be rejoiced, and rejoice.

    However, node-pcre, like any wrapper around binary code, requires separate compilation on each of the platforms compatible with Node.

    I wonder if it will come to someone’s mind over time to use Emscripten to translate the PCRE engine directly into JavaScript?

    Dreams Dreams.

    Also popular now: