-3

I need to build a regular expression, which is going to be used in a Google Analytics filter. The regular expression needs to capture all of following strings:

/webshop?product=bil, /webshop?product=indbo, /webshop?product=hus, /webshop?seksjon=product, /webshop?product=ulykke

I've tried building several regex s but no luck this time. Can someone help?

Duck Dodgers
  • 3,409
  • 8
  • 29
  • 43
micklyngo
  • 1
  • 1
  • use something like https://rubular.com/ and you'll get instant feedback on what works and not. Then come back here with a more detailed question when you are stuck. Post input and expected output. – Fredrik Pihl Mar 08 '19 at 09:11
  • Possible duplicate of [Learning Regular Expressions](https://stackoverflow.com/questions/4736/learning-regular-expressions) – Biffen Mar 08 '19 at 09:18
  • 4
    `.*` matches all of those. – Biffen Mar 08 '19 at 09:19

1 Answers1

0

Here is a sample code. you could modify as required

(\/webshop\?(?:product|seksjon)\=\w+)

Verify result here

Pavan Kumar T S
  • 1,539
  • 2
  • 17
  • 26