PHP FILTER_VALIDATE_REGEXP Filter
Complete PHP Filter Reference Manual
Definition and Usage
The FILTER_VALIDATE_REGEXP filter validates a value against a Perl-compatible regular expression.
- Name: "validate_regexp"
- ID-number: 272
Possible options:
- regexp - Specifies the regular expression used for validation
Example
array("regexp"=>"/^M(.*)/")))) ?>The output of the code is shown below:
string(17) "Match this string"
Complete PHP Filter Reference Manual