The FILTER_VALIDATE_REGEXP filter validates value against a Perl-compatible regular expression.
Possible options : -
The output of the code will be : -
string(17) "Match this string"