It would be one thing if this were a tool for generating a regex, which the developer then copies and pastes into the source code. But it’s expected that this syntax is checked in and maintained in the source, with all the requisite constraints and dependencies. It’s unportable to other languages, unreadable without the docs, and non-standard. It's also another runtime dependency that will need periodic security updates applied (I hope :-D). Meanwhile, there is a standard, built-in cross-language syntax for expressing these things (and great tools like https://regexr.com/ for reference).
Maybe this makes sense in one-off scripts, but I don't see it adding value where the code is intended to be a source of truth.