$body = '<a href="#" title="ali">Ali</a><a href="#">at</a>a bak.'; $body = preg_replace('~<a[^>]+>([^<]+)<\/a>~i', '$1', $body);