3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'azer <a href="aze">qsdf</a> 12456'; $result = preg_replace("/<\\/?a(\\s+.*?>|>)/", "", $string); echo "string = $string <br/>"; echo "result = $result <br/>";

preferences:
36.65 ms | 402 KiB | 5 Q