1.preg_filter — 執行一個正則表達式搜索和替換
mixed preg_filter ( mixed $pattern , mixed $replacement , mixed $subject [, int $limit = -1 [, int &$count ]] )
2.preg_grep — 返回匹配模式的數組條目
array preg_grep ( string $pattern , array $input [, int $flags = 0 ] )
返回給定數組input中與模式pattern 匹配的元素組成的數組.
3.preg_match_all — 執行一個全局正則表達式匹配
int preg_match_all ( string $pattern , string $subject [, array &$matches [, int $flags = PREG_PATTERN_ORDER [, int $offset = 0 ]]] )
搜索subject中所有匹配pattern給定正則表達式 的匹配結果并且將它們以flag指定順序輸出到matches中.在第一個匹配找到后, 子序列繼續從最后一次匹配位置搜索.
4.preg_match — 執行匹配正則表達式
int preg_match ( string $pattern , string $subject [, array &$matches [, int $flags = 0 [, int $offset = 0 ]]] )
搜索subject與pattern給定的正則表達式的一個匹配.
5.preg_quote — 轉義正則表達式字符
string preg_quote ( string $str [, string $delimiter = NULL ] )
preg_quote()需要參數 str 并向其中 每個正則表達式語法中的字符前增加一個反斜線。 這通常用于你有一些運行時字符串 需要作為正則表達式進行匹配的時候。
6.preg_replace — 執行一個正則表達式的搜索和替換
mixed preg_replace ( mixed $pattern , mixed $replacement , mixed $subject [, int $limit = -1 [, int &$count ]] )
搜索subject中匹配pattern的部分, 以replacement進行替換。