Regex str_replace

前端 未结 2 551
灰色年华
灰色年华 2020-12-18 17:58

Would it be possible to incorporate a str_replace method with a regular expression, designed to catch url strings in a simple html < textfield > input type?<

2条回答
  •  一向
    一向 (楼主)
    2020-12-18 18:25

    What you're looking for is preg_replace:

    $pg = preg_replace('{regex goes here}', '{replacement goes here}', $pg);
    

提交回复
热议问题