0

I am trying to setup a tracking script which hits on a url. However I am lost on how to ignore the number in the url.

For example - the url is /account/checkout/21212/complete

Where 21212 is always random or changing, how can I match the URL with regex even with the changing 21212 number?

Something like /account/checkout/regex number/complete

Any suggestion would be appreciated.

1
  • 1
    \/account\/checkout\/\d+\/complete Commented Apr 4, 2016 at 19:43

1 Answer 1

2

Use \d to match a digit, with + to match one or more occurrences:

/account/checkout/\d+/complete
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.