Search for number in URL

Hi, I have a macro that gets copies a URL to the clipboard. I'd then like to extract a number from the URL and feel like the solutiuon is regex but I have no idea what I'm doing.

Here's my workflow so far:

Command + L puts the cursor in the URL box and Command + C copies it. Now I'd like to find a number.

Here's an example URL: and I'd like to extract the number 196475

Thanks in advance for any help.


If the format of the URL is always exactly like that, so that you have:

then you can use this RegEx:

For details, see

Use this RegEx in a KM Search using Regular Expression action

You can test any RegEx using

Let us know if you need further help.

That worked perfectly, thanks a lot.