RegEx Help Needed (Probably Easy)

Hi guys,

I tried several things using regular expression but no "luck". I am hoping for a quick help by you.

What's the aim?
My aim is to use the "Search Text and save to variable" feature. With the new set variables, I want to open - based on my choice [Prompt with List] - the specific url. I have build everything, though I struggle with the regular expressions.

What's the text?
The text looks like this:
0. Overview, https://www.overview.com;

  1. Google Website, https://www.google.com;
  2. Amazon Products, https://www.amazon.com;
    [...]
  3. Wish.com Lists, https://www.wish.com;

The text follows the following pattern:
a number (up to 100) + any amount of words until "," --> an URL until ";"

Ideally it would then set the new variables to the following:
1: [varname] local__choice1 to "0. Overview"
2: [varname] local__url1 to "https://www.overview.com"
3. [varname] local__choice2 to "1. Google"
4: [varname] local__url2 to "https://www.amazon.com"
etc.

I am trying different Regular Expression but the Filter does not work...

Anyone knows how to do it?
Thanks so much!

Show us what you’re trying. And by that I mean upload your macro so we don’t have to reinvent the wheel!

That's a method, not really an aim -- unless this is a purely academic exercise in using that feature...

It looks like you want a list of URLs and their descriptions that you can use in a "Prompt With List" action. If you look at that action's Wiki page you'll see that you can have a list of the format

https://www.overview.com__Overview
https://www.google.com__Google
https://www.amazon.com__Amazon
https://www.wish.com__Wish.com

...which will be presented in the dialog as the descriptions ("Overview", "Google"...) after the double-underscore, but the choice(s) returned will be the URL(s) before the double-underscore.

No regex required.

1 Like

Hey Michael, I think this Regex will work.

2 Likes

Thank you so much! Excellent. That works the way I want it!