admin 發表於 2023-7-24 14:19:28

ereg_replace()-正規式比對並取代

ereg_replace($pattern, $replacement, $string)
說明:
$pattern:正規式文字字串規則
$replacement:取代比對到的文字
$string:欲比對之字串此函式傳回修改過的字串,如果比對不到則傳回原來的字串。

程式碼範例:


執行結果:





頁: [1]
查看完整版本: ereg_replace()-正規式比對並取代