Terrabythia
Terrabythia

Reputation: 2141

Google Analytics Goal Regex URL

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.

Upvotes: 0

Views: 188

Answers (1)

Stephan
Stephan

Reputation: 43013

Try this:

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

Description

Regular expression visualization

Upvotes: 1

Related Questions