I am extracting the tags and their surrounding text in the HTML source code. This is the Regex pattern that I use in my code:
String a_pattern = "(.*?)<a (.*?)</a>(.*)";
I tried to use "?" to make the quantifier lazy. However, this pattern takes lots of time while compiling a long string.
Can you please give me some hints on optimizing this pattern?
I should note that I need all three groups of text (before, within, and after )
Thank you