Thursday, March 8, 2012

Regexp match with GenericValidator

Just a reminder to use GenericValidator for a quick way to do regexp matching in Java.

boolean rslt = org.apache.commons.validator.GenericValidator.matchRegexp(str, "(?i)abc|def|ghi");


No comments:

Post a Comment

CSP on Apache

To add CSP to root if sort of funny. The following will NOT work for most cases !!     <LocationMatch "^/$">        Header s...