Skip to content

Commit

Permalink
docs(regex): clarify regex manager limitations (#16709)
Browse files Browse the repository at this point in the history
  • Loading branch information
electriquo committed Jul 24, 2022
1 parent 1b36708 commit bb52f97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/modules/manager/regex/readme.md
Expand Up @@ -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.
Expand Down

0 comments on commit bb52f97

Please sign in to comment.