The RegExpValidator is used for validating regular expressions.
Under the hood it uses the org.apache.oro.text.regexp package
for regexp validation.
if an exact match is found the validate method returns true
if the string value passed is a "", then the RegExpValidator
returns true. This is done to prevent duplicate validation
on the field in case the RequiredFieldValidator is also used.

validate(ServletRequest req)
users may use this method to validate the value of the parameter
in the request
for eg: the parameter value must contain NYC or it must not contain XYZ
or they may even validate it against the custom expression
set optionally.

RegExpValidator

validate

users may use this method to validate the value of the parameter
in the request
for eg: the parameter value must contain NYC or it must not contain XYZ
or they may even validate it against the custom expression
set optionally.