PHP 正則表示式
阿新 • • 發佈:2022-04-29
本文主要介紹了 PHP 正則表示式相關的函式。
官方文件:http://php.net/manual/zh/ref.pcre.php
int preg_match($pattern, $subject, [ array &$matches ])
int preg_match_all($pattern, $subject, array &$matches)
返回匹配到結果的次數。
preg_replace($pattern, $replacement, $subject)
preg_filter($pattern, $replacement, $subject)
preg_grep($pattern, array $input)
preg_split($pattern, $subject)
preg_quote($str)