Question

I'm kind of new to regular expressions and can't figure out what the regular expression for this Google Analytics Goal URL should be.

The URL

examplesite.com/order/898/card

Should be considered the same as

examplesite.com/order/card

But not the same as

examplesite.com/order/898/delivery

So basically I want the regular expression for the URL

examplesite.com/order/*card

and

examplesite.com/order/*delivery

Etc.

I've Googled for something like this, but regular expressions for me are still al little to difficult.

Was it helpful?

Solution

Try this:

examplesite.com/order/(\d+/)?card

Description

Regular expression visualization

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top