I am not good in regex, need help in the below scenario. I have a big HTML response as a string having different anchor tags with URLs. I am planning to find that URL's from string and replace that with encrypted URLs.
Now the problem is that how I can pick that URL one by one, encrypt that and again set that in HTML string. My html looks like as:
<body>
.........
<a href="http://site1.com/text/123"> site1 </a>
.........
<a href="http://site1.com/text/345"> site2 </a>
.........
</body>