Hi guys,
Can anyone see what's wrong with the following regex ...
$para = '[a href="home"]see our food[/a]';
$para = preg_replace('/\[a href="([^"]*)"\]([^[]*)\[\/a\]/', '<a href="\1">\2</a>', $para);
// doesn't work
Whereas, this simpler one does work ...
$para = preg_replace('/\[a\]([^[]*)\[\/a\]/', '<a href="#">\1</a>', $para);
Cheers,
Paul