I want to find all the links in text. For example, with this input:
foo [https://www.example.com/link1](https://www.example.com/link2) data
bar https://www.example.com/link3?test[0]=val data data
xyz https://www.example.com/link4] test foo
I want to get following links:
https://www.example.com/link1
https://www.example.com/link2
https://www.example.com/link3?test[0]=val
https://www.example.com/link4
I managed to create this regex:
(https://((?!s|]|)).)*)
But it fails with extracting: https://www.example.com/link3?test[0]=val
. How can I cover this case?
https://regex101.com/r/So5Bx9/1