Update RegexSelector.java

master
Almark Ming 2013-12-17 16:57:22 +08:00
parent 83926970b2
commit 91ed66ecac
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ public class RegexSelector implements Selector {
if (StringUtils.isBlank(regexStr)) {
throw new IllegalArgumentException("regex must not be empty");
}
/* Can't detect '\(', '(?:)' so that would be result in ArrayIndexOutOfBoundsException
/* Can't detect '\(', '(?:)' so that would result in ArrayIndexOutOfBoundsException
if (!StringUtils.contains(regexStr, "(") && !StringUtils.contains(regexStr, ")")) {
regexStr = "(" + regexStr + ")";
}