Метод | Описание | |
---|---|---|
preg_last_error ( ) : int | ||
preg_quote ( string str, string delimiter = null ) : string |
Quote regular expression characters. The special regular expression characters are: . \ + * ? [ ^ ] $ ( ) { } = ! < > | : - Note that / is not a special regular expression character. |
|
preg_replace ( |
||
preg_replace ( |
Perform a regular expression search and replace.
|
Метод | Описание | |
---|---|---|
preg_grep ( |
||
preg_grep ( string pattern, |
||
preg_match ( |
||
preg_match ( |
||
preg_match_all ( |
||
preg_match_all ( |
||
preg_replace ( |
||
preg_split ( string pattern, string subject, int limit = -1, int flags ) : |
public static preg_quote ( string str, string delimiter = null ) : string | ||
str | string | The string to be escaped. |
delimiter | string | If the optional delimiter is specified, it will also be escaped. /// This is useful for escaping the delimiter that is required by the PCRE functions. The / is the most commonly used delimiter. |
Результат | string |
public static preg_replace ( |
||
ctx | ||
pattern | ||
replacement | ||
subject | ||
limit | int | |
Результат |
public static preg_replace ( |
||
ctx | A reference to current context. Cannot be |
|
pattern | The pattern to search for. It can be either a string or an array with strings. | |
replacement | The string or an array with strings to replace. /// If this parameter is a string and the pattern parameter is an array, all patterns will be /// replaced by that string. If both pattern and replacement parameters are arrays, each pattern will be /// replaced by the replacement counterpart. If there are fewer elements in the replacement array than /// in the pattern array, any extra patterns will be replaced by an empty string. | |
subject | The string or an array with strings to search and replace. /// If subject is an array, then the search and replace is performed on every entry of subject, and the return value is an array as well. | |
limit | int | The maximum possible replacements for each pattern in each subject string. Defaults to |
count | long | This variable will be filled with the number of replacements done. |
Результат |