久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php如何去除標(biāo)點(diǎn)符號

      php去除標(biāo)點(diǎn)符號的方法:首先創(chuàng)建一個(gè)PHP示例文件;然后通過正則表達(dá)式“preg_replace($pattern, ' ', $str);”刪除字符串中的中英文標(biāo)點(diǎn)符號即可。

      php如何去除標(biāo)點(diǎn)符號

      推薦:《PHP視頻教程》

      php正則,刪除字符串中的中英文標(biāo)點(diǎn)符號

      原理很簡單,正則查找字符串,然后替換

      英文標(biāo)點(diǎn)符號,正則中有專用的模式來匹配。中文則需要一一列舉

      代碼:

      <?php   $str = "!@#$%^&*(中'文:;﹑?中'文中'文().,<>|[]'"";     //中文標(biāo)點(diǎn) $char = "。、?。浚?;﹑?"…‘’“”〝〞∕|‖— 〈〉﹞﹝「」??〖〗】【??』『〕〔》《﹐?﹕︰﹔!???﹖﹌﹏﹋'′ˊˋ―﹫︳︴ˉ_ ̄﹢﹦﹤‐-?﹟﹩﹠﹪﹡﹨﹍﹉﹎﹊ˇ︵︶︷︸︹︿﹀︺︽︾ˉ﹁﹂﹃﹄︻︼()";    $pattern = array(     "/[[:punct:]]/i", //英文標(biāo)點(diǎn)符號     '/['.$char.']/u', //中文標(biāo)點(diǎn)符號     '/[ ]{2,}/' ); $str = preg_replace($pattern, ' ', $str); echo $str;

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號