Regular expression to extract link text from anchor tag

前端 未结 3 1366
不思量自难忘°
不思量自难忘° 2020-12-20 01:15

i want to get the word Asarum in the below line:

 

        
3条回答
  •  时光取名叫无心
    2020-12-20 01:50

    You need to assign the result:

    $link = preg_replace('//i', '', $link);
    $link = preg_replace('/<\/a>/i', '', $link);
    echo $link;
    

提交回复
热议问题