Rich-text Reply

RegEx

vitafiveAdmin 11-09-16

RegEx

I am trying to learn how to do a regular expression with a website like this: https://shop.vitafive.com/v2/plans/8459/checkout. The problem is the number 8459 change every time. Can someone please help me with the regex I need to use. 

robertchan 11-10-16
 

Re: RegEx

Assuming the 8459 is only replaced with positive numbers starting at 0 or above, the following should work for your URL targeting:

https://shop.vitafive.com/v2/plans/([1-9][0-9]*)|0/checkout
Robert Chan

Experimentation Hero

Re: RegEx

For some reason this wasn't able to work. Are you sure this is exact? 

 

Re: RegEx

[ Edited ]

basically yo have a constant
- https://shop.vitafive.com/v2/plans/
- 4 Digits from 0-9
- Another constant
so

https:\/\/shop.vitafive.com\/v2\/plans\/[0-9]0-90-90-9\/checkout/

sould work

SEO and CRO Specialist

Re: RegEx

Hey! It didn't look like the reg-ex you gave me worked. Are you able to check and make sure? I tried it and it sent me back to my home page