Created
July 22, 2008 16:25
-
-
Save adammika/1127 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check whether the regex is in the compareTo string | |
private boolean contains(String regex, String compareTo) | |
{ | |
Pattern p = Pattern.compile(regex); | |
Matcher m = p.matcher(compareTo); | |
return m.matches(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment