<a href="$handler$&landing_url=https://foo.com/index.html">
<img src="https://foo.com/images/08_180x80.gif" border="0" alt="">
</a>
I have this code which I need to return to calling service. However, while returning, i need to replace $handler$ with something i get from props file. Which is easy.
hard part is :
I need to get the landing_url , encrypt it, also add more info to it.
How can i parse this fragment into pieces ?
or is there an easier way to do it?
This is the regex you need:
/<a href=\".*?landing_url=(.*?)\">/.Putting all the code together: