docs(regex): clarify regex manager limitations (#16709)

This commit is contained in:
foolioo 2022-07-24 06:25:45 +00:00 committed by GitHub
parent 1b36708c64
commit bb52f9785a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,6 +51,9 @@ If you're looking for an online regex testing tool that supports capture groups,
Be aware that backslashes (`'\'`) of the resulting regex have to still be escaped e.g. `\n\s` --> `\\n\\s`.
You can use the Code Generator in the sidebar and copy the regex in the generated "Alternative syntax" comment into JSON.
The `regex` manager uses [RE2](https://github.com/google/re2/wiki/WhyRE2) which does not support [backreferences and lookahead assertions](https://github.com/uhop/node-re2#limitations-things-re2-does-not-support).
The `regex` manager matches are done per-file and not per-line, you should be aware when using the `^` and/or `$` regex assertions.
### Configuration templates
In many cases, named capture groups alone won't be enough and you'll need to configure Renovate with additional information about how to look up a dependency.