functions-online

Regular Expression

Execute and test PHP functions for manipulating data through regular expressions.

The syntax for patterns used in these functions closely resembles Perl 5. The expression must be enclosed in the delimiters, a forward slash (/), for example. Delimiters can be any on-alphanumeric, non-whitespace ASCII character except the backslash (\) and the null byte. If the delimiter character has to be used in the expression itself, it needs to be escaped by backslash.

preg_filter

preg_filter()等价于 preg_replace() 除了它仅仅返回(可能经过转化)与目标匹配的结果. 这个函数怎样工作的更详细信息请阅读 preg_replace()文档.

preg_grep

返回给定数组$input中与模式$pattern 匹配的元素组成的数组.

preg_match

搜索$subject与$pattern给定的正则表达式的一个匹配.

preg_match_all

搜索$subject中所有匹配$pattern给定正则表达式 的匹配结果并且将它们以$flag指定顺序输出到$matches中.

搜索subject中所有匹配pattern给定正则表达式 的匹配结果并且将它们以flags指定顺序输出到matches中.

preg_replace

搜索$subject中匹配$pattern的部分, 以$replacement进行替换。

preg_quote

preg_quote()需要参数 $str 并向其中 每个正则表达式语法中的字符前增加一个反斜线。 这通常用于你有一些运行时字符串 需要作为正则表达式进行匹配的时候。

preg_split

通过一个正则表达式分隔给定字符串.