Author: bspeakmon Date: Wed Oct 31 22:40:50 2007 New Revision: 590906 URL: http://svn.apache.org/viewvc?rev=590906&view=rev Log: - VALIDATOR-193: replacing oro regex with java.util.regex in GenericValidator
Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java?rev=590906&r1=590905&r2=590906&view=diff ============================================================================== --- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java (original) +++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java Wed Oct 31 22:40:50 2007 @@ -18,8 +18,7 @@ import java.io.Serializable; import java.util.Locale; - -import org.apache.oro.text.perl.Perl5Util; +import java.util.regex.Pattern; /** * This class contains basic methods for performing validations. @@ -62,8 +61,7 @@ return false; } - Perl5Util matcher = new Perl5Util(); - return matcher.match("/" + regexp + "/", value); + return Pattern.matches(regexp, value); } /**