|
|
@ -8,6 +8,7 @@ import com.idormy.sms.forwarder.utils.RuleLineUtils;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
import java.util.regex.PatternSyntaxException;
|
|
|
|
import java.util.regex.PatternSyntaxException;
|
|
|
|
|
|
|
|
|
|
|
@ -172,7 +173,13 @@ public class RuleModel {
|
|
|
|
case CHECK_REGEX:
|
|
|
|
case CHECK_REGEX:
|
|
|
|
if (msgValue != null) {
|
|
|
|
if (msgValue != null) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
checked = Pattern.matches(this.value, msgValue);
|
|
|
|
//checked = Pattern.matches(this.value, msgValue);
|
|
|
|
|
|
|
|
Pattern pattern = Pattern.compile(this.value, Pattern.CASE_INSENSITIVE);
|
|
|
|
|
|
|
|
Matcher matcher = pattern.matcher(msgValue);
|
|
|
|
|
|
|
|
while (matcher.find()) {
|
|
|
|
|
|
|
|
checked = true;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
} catch (PatternSyntaxException e) {
|
|
|
|
} catch (PatternSyntaxException e) {
|
|
|
|
checked = false;
|
|
|
|
checked = false;
|
|
|
|
Log.d(TAG, "PatternSyntaxException: ");
|
|
|
|
Log.d(TAG, "PatternSyntaxException: ");
|
|
|
|