Skip to content

Add new XRegExp backend #1

Open
@slevithan

Description

@slevithan

Are you interested in adding an XRegExp backend (separate from the standard JavaScript backend)? It should be easy to do, since you already support JavaScript with Node.js. You'd probably just need to include XRegExp (var XRegExp = require('xregexp').XRegExp;, after installing with npm), add checkboxes for XRegExp's three nonnative flags (s, x, and n), and use XRegExp.replace/exec/test/split rather than the native methods, for testing.

Actually, since XRegExp compiles to native regexes, you don't even need to use XRegExp.exec/test/split. You do need XRegExp.replace, to use XRegExp's replacement text syntax. You'd probably also want to use XRegExp.exec, so that you get named backreferences on the result array.

If you have any questions or run into any issues, I'd be happy to help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions