int matchRegEx(string $pattern, int $optionflags, string $str1[, string $str2...])

This function compares a regular expression pattern to a list of strings to see if $pattern matches any of the strings in the list. If $pattern does not match any strings, then this  function will return 0, else the function returns 1 or greater. For instance, if $pattern matches $str1, then this function will return 1, if $pattern matches $str2, then this function will return 2, etc.


0 - set $optionflags to zero for none of the below options (this will case a case-sensitive match)

1 - case-insensitive (default is case-sensitive)

2 - multiline mode; changes the meaning of ^ and $ so they match at the beginning and end, respectively, of any line, and not just the beginning and end of the entire string

4 - single-line mode; changes the meaning of the dot (.) so that it matches every character (instead of every character except \n)

This function uses the "PCRE regex flavor". PCRE is short for Perl Compatible Regular Expressions. This page describes the syntax of regular expressions in Perl.

This function is supported only in CSE HTML Validator v11.00 and later.