/^(?:--)?registry\s+['"](?<registry>.*)['"]/
But it's common to wrap registry in quotes, which then fails to match.
e.g. (copied from a Google Search)
registry "https://nexus.dev/repository/npm-proxy/"
"@mycompany:registry" "https://myserver.dev/repository/npm-releases/"
https://github.com/dependabot/dependabot-core/blob/main/npm_and_yarn/lib/dependabot/npm_and_yarn/update_checker/registry_finder.rb#L15
Regex for .yarnrc registry is:
But it's common to wrap registry in quotes, which then fails to match.
e.g. (copied from a Google Search)