ap_checkmask — check whether a string matches a mask
int ap_checkmask(const char *data, const char *mask)
Checks whether data conforms to the mask in mask
.
mask
is composed of the following characters:
@
An uppercase letter
$
A lowercase letter
&
A hexadecimal digit
#
A decimal digit
~
A decimal digit or a space
*
Any number of any character
Itself
data
is arbitrarily limited to 256 characters. It
returns 1
for a match, 0
if
not. For example, the following code checks for RFC 1123 date format:
if(ap_checkmask(date, "## @$$ #### ##:##:## *")) ...