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");


Comments

Popular posts from this blog

Java encoding : UTF-8, Big5, x-MS950-HKSCS