mirror of
https://github.com/corda/corda.git
synced 2025-02-07 19:40:25 +00:00
Regex: support the dot
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
e2105670a0
commit
d753edafcd
@ -33,5 +33,7 @@ public class Regex {
|
|||||||
expectNoMatch("a(bb)?a", "abbba");
|
expectNoMatch("a(bb)?a", "abbba");
|
||||||
expectNoMatch("a(bb)?a", "abbaa");
|
expectNoMatch("a(bb)?a", "abbaa");
|
||||||
expectGroups("a(a*?)(a?)(a??)(a+)(a*)a", "aaaaaa", "", "a", "", "aaa", "");
|
expectGroups("a(a*?)(a?)(a??)(a+)(a*)a", "aaaaaa", "", "a", "", "aaa", "");
|
||||||
|
expectMatch("...", "abc");
|
||||||
|
expectNoMatch(".", "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,6 +141,9 @@ class Compiler implements PikeVMOpcodes {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
case '.':
|
||||||
|
current.push(DOT);
|
||||||
|
continue;
|
||||||
case '?':
|
case '?':
|
||||||
current.push(new QuestionMark(current.pop()));
|
current.push(new QuestionMark(current.pop()));
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user