'Search using Regular Expression' action help

I am new to regular expressions and am having trouble extracting the data between "[" and "]" using the 'Search using Regular Expression' action in the following variable, any help would be greatly appreciated:

Variable Name = hyperLink

This e-mail is from an automated system. PLEASE DO NOT REPLY.

Report details:....

Found it, thank you.


If the text you are searching is the above, I don't see how your answer could possibly work:

You may want to test it at Regex101.com

This simple RegEx works for me:

For details, see regex101: build, test, and debug regex

The URL will be in the first Capture Group.

I am not sure how my solution worked but I will use yours to make sure it works :slight_smile:

Thank you for your help

1 Like

Your original regex is a positive lookbehind for the opening bracket, then anything (which finds the URL), then a positive lookahead for the closing bracket. The lookbehind and lookahead don't capture (they are just requirements), so that's why the brackets aren't included in the found text.

1 Like