For the following generated HTML
<a href="http://google.com">google.com</a>
Static text
<a href="http://Bing.com">bing.com</a>
<a href="http://google.com">google.com</a>
Static text
<a href="http://Bing.com">bing.com</a>
<a href="http://Bing.com">bing.com</a>
I need to match(pseudo):
(Single URL) \nStatic text\n (Multiple URLs)
Like:
MATCH 1
1. 'http://google.com'
2. 'http://Bing.com'
MATCH 2
1. 'http://google.com'
2. 'http://Bing.com'
3. 'http://Bing.com'
For this example, how do I repeat a captured group?
My attempt:
(http:\/\/[a-zA-Z.-_]{1,}){1}[">.a-zA-Z<>\/]{1,}\nStatic text\n[">.a-zA-Z<>\/ =]{1,}(http:\/\/[a-zA-Z.-_]{1,}){1,}
(See also https://regex101.com/r/cJ2wJ6/5), which does not seem to do the trick. Where am I going wrong?