Help with regex

Hi

I want to extract the number after /ticket/ from that url with regex:

https://app.hubspot.com/contacts/1234567/ticket/1871234567

I tried /\/ticket\/([0-9]+)/ which worked in Simulator on regex101.com but not in make.

i use the scenario match pattern.

thanks for your help in advance

Hello,

If that’s all you’re matching, the number at the end of that single line, then you could use this:
image

image

2 Likes

thank you. as there can be other content too in that string, i went with this one:

\/ticket\/(?<ticketNumber>[0-9]+.*)

from chat gpt haha :wink:

1 Like

Heya @elk welcome to the community :wave:

I just wanna quickly jump in and say awesome work figuring this one out with the help of @Donald_Mitchell and gold old ChatGPT :muscle:

Also, thanks a lot for keeping the community in mind and coming back here to share what you learned and what did the trick for you :pray:

Keep up the great work :sunglasses:

1 Like