Regex hangs the interface

I’m trying to use the following regex in an expression


{{$json["output"].toString().match((https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})\/result.csv)}}

but when I paste it into the expression editor, it just hangs the interface, how do I get around this?


wait doesn’t help :wink:

What browser are you using?

chrome, latest version. Windows 11

Hey @RedPacketSec,

Did you find this issue with any other browser?

I just gave it a test in firefox and I get the same issue, Interestingly enough though the editor comes back with “too much recursion” so I suspect the issue is where it is just to parse the regex and product the output.

image

What is the goal with the regex there could be a better way to handle it.

extracting a specific URL in the output of a string, but I’ve given up with it for now, found a different longer way to get the results.

That is good to know.