Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
moduleName: ["']?github\.com\/(?<depName>[\w\-]+\/[\w\-\.]+)["']?,?\s+version:\s+["']?(?<currentValue>[_\-\.\w]+)["']?
/
gm

Description

Match:

  plugins:
    plugin-name: { moduleName: github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin, version: v1.3.0 }

  plugins:
    plugin-name:
      moduleName: "github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
      version: 'v1.3.0'
Submitted by Yevhen Kolomeiko (Sad-Soul-Eater) - 7 months ago (Last modified 7 months ago)