mirror of
https://github.com/corda/corda.git
synced 2025-01-19 11:16:54 +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", "abbaa");
|
||||
expectGroups("a(a*?)(a?)(a??)(a+)(a*)a", "aaaaaa", "", "a", "", "aaa", "");
|
||||
expectMatch("...", "abc");
|
||||
expectNoMatch(".", "\n");
|
||||
}
|
||||
}
|
||||
|
@ -141,6 +141,9 @@ class Compiler implements PikeVMOpcodes {
|
||||
continue;
|
||||
}
|
||||
switch (c) {
|
||||
case '.':
|
||||
current.push(DOT);
|
||||
continue;
|
||||
case '?':
|
||||
current.push(new QuestionMark(current.pop()));
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user