Merge pull request #11598 from srogljan/master
UNICODE_CHARACTER_CLASS fix
This commit is contained in:
commit
8dad4d03f4
|
@ -150,7 +150,7 @@ public class Regex {
|
|||
pFlags |= Pattern.LITERAL;
|
||||
} else if ("COMMENTS".equals(s)) {
|
||||
pFlags |= Pattern.COMMENTS;
|
||||
} else if ("UNICODE_CHAR_CLASS".equals(s)) {
|
||||
} else if (("UNICODE_CHAR_CLASS".equals(s)) || ("UNICODE_CHARACTER_CLASS".equals(s))) {
|
||||
pFlags |= UNICODE_CHARACTER_CLASS;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unknown regex flag [" + s + "]");
|
||||
|
|
|
@ -28,7 +28,7 @@ import static org.hamcrest.Matchers.equalTo;
|
|||
public class RegexTests extends ESTestCase {
|
||||
public void testFlags() {
|
||||
String[] supportedFlags = new String[]{"CASE_INSENSITIVE", "MULTILINE", "DOTALL", "UNICODE_CASE", "CANON_EQ", "UNIX_LINES",
|
||||
"LITERAL", "COMMENTS", "UNICODE_CHAR_CLASS"};
|
||||
"LITERAL", "COMMENTS", "UNICODE_CHAR_CLASS", "UNICODE_CHARACTER_CLASS"};
|
||||
int[] flags = new int[]{Pattern.CASE_INSENSITIVE, Pattern.MULTILINE, Pattern.DOTALL, Pattern.UNICODE_CASE, Pattern.CANON_EQ,
|
||||
Pattern.UNIX_LINES, Pattern.LITERAL, Pattern.COMMENTS, Regex.UNICODE_CHARACTER_CLASS};
|
||||
Random random = getRandom();
|
||||
|
|
Loading…
Reference in New Issue