By default bot should ignore errors, adding ignore command to all functions is really time consuming. This is where BAS needs to make changes. It is better to define a fail or stop command rather than modifying each block..really BAS Should do something so that Bot don't stop on minor errors.
Regex match multiple groups
-
Hi
I'm trying to extract urls from variable and i tried regex
^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)Here example link:
https://regex101.com/r/cusF8m/1I tried both blocks in BAS "Extract all data" and "First Match" and both gives first matched url, how i can get all matched urls like in example link?
-
@gudolik said in Regex match multiple groups:
Hi
I'm trying to extract urls from variable and i tried regex

-
@Fox said in Regex match multiple groups:
@gudolik said in Regex match multiple groups:
Hi
I'm trying to extract urls from variable and i tried regex

Reason i ask for regex because i dont need http/https and URI just domains like
example.com sub.example.com -
@gudolik said in Regex match multiple groups:
Reason i ask for regex because i dont need http/https and URI just domains like
The domain, if anything, could be removed later... In the action "Exctract all data" the flag "multi line" is disabled, if you turn it off in your example, it will find only one match:
https://regex101.com/r/kUqEJr/1
In order for your regular expression to work, you need to enable the "multi line" flag
(?m)^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)