My company is using a third party for their mobile sites and we have a console to update some of the code and control stuff through them. One of the things is a search and replace feature that can update the code for the site. The only thing is: it uses a lot of complex regex code and I can't seem to find a good tutorial on the complex stuff. So here is the example he gave me that sticks grabs the paragraph tag and puts it in the link:
Search
(#d6d6d4.+?>.+?<p><a.+?>.+?)</a>(.+?)</td>
Replace With
$1$2</a></td>
What is the $1
and $2
representing? I know it probably has something to do with one of the .+?
but I am unsure which one. I have added the code down below with numbers next to the regex variables
(#d6d6d4.+?**[1]**>.+?**[2]**<p><a.+?**[3]**>.+?**[4]**)</a>(.+?**[5]**)</td>