Function: preg_p_escape()

function preg_p_escape(string $pattern): string;

Escapes the special characters in the text used for the regular expression pattern.

Parameters

Name Pass type Value type Default value Description
$pattern by value string

The pattern to be escaped.

Returns

string

Returns the text with escaped special characters.

Authors

Oleg Schildt

Package

Source code

See also