I have a situation where I need to find 2 groups in some text and replace $1 with $2.
I’m not sure it’s possible. Also, I don’t want to use php but simple search and replace.
See here or see this text:
<li>
<div>
<a href="/video/testimonials/video-477" class="shadow"></a>
</div><div class="videoTb_title">Kevin Austin</div>
</li>
What I want is to find video-477 and replace it with Kevin Austin.
This is just an example, I have more li’s that have different names and video id’s
Any ideas?
Thanks
Assuming /video/testimonials is actually part of most of your urls, you can capture and replace with the following regex:
to be replaced with
Keep in mind, your example accepted: href=”/video/testimonials/Kevin Austin”, which might be considered bad practice to use whitespace in urls.