Skip to content

Consider using the RE2 regex library #439

Open
@rafapcarvalho

Description

@rafapcarvalho

I'm working on a project where we plan to replace our custom algorithm in some scenarios with a rule engine, and among a few options, I suggested using this one.
In the first Proof of Concept (PoC), I needed to make a modification to achieve the same result as in Java aplication, and that involved using the RE2 regex, where I had to switch the default library to one that can handle lookaheads and lookbehinds.

However, I wouldn't like to continue the project with an in-house fork within the company.

Would it be possible to consider adding a default function that utilizes the RE2 regex?
This way, we could maintain the current regex and have a separate new function that supports RE2.

The library I used and worked well is: "github.com/dlclark/regexp2". If you know of another one with more frequent updates, that would be good to explore.

Example expression not supported by the Go standard library: ^00(?!56)[1-9][0-9]{7,}

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