Regex
11 entries
PCRE pattern modifiers (i/m/s/x/u/D)
A semantics table for PCRE modifiers — i (case), m (line anchors), s (dot-all), x (free-spacing), u (UTF-8), D (strict $) — and how each language's flag system maps to them.
preg_filter
Performs a preg_replace-style substitution but returns only the elements that were replaced — on arrays it is filter-and-replace in one.
preg_grep
Returns the array elements that match a pattern (original keys preserved).
preg_last_error
Returns the error code of the most recent PCRE failure.
preg_match
Searches a string for a match using a regular expression.
preg_match_all
Searches a string for all matches of a regular expression (not just the first) and returns the match count.
preg_quote
Escapes the special characters in a regular expression.
preg_replace
Replaces matches in a string using a regular expression.
preg_replace_callback
Finds every match of a regular expression and calls a callback to compute the replacement text for each.
preg_replace_callback_array
Runs a regex substitution with one callback per pattern (PHP 7+), handling many token kinds in a single call instead of stacked preg_replace_callback calls.
preg_split
Splits a string using a regular expression as the delimiter.