How could I use RegEx to find <a class="modal>
and replace it with <a class="modal-link"
?
I tried:
preg_replace('/<a class="(.*?)">(.*?)<\/a>/i', '<a class="$1-link">$2</a>', $input);
but it's not working. Please can someone point me out to the right solution ?
By the way: I'am styling Joomla 2.5 frontpage edit content page, where the approved user can post an article. That string where i want to apply on my regex comes from:
<?php echo $this->form->getInput('image_intro', 'images'); ?>
it generates this HTML:
<a class="modal" ...>Choose</a>