blob: f270428b18af1a8d2505c9ae32218e6091956573 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use std
use "testmatch.use"
const main = {
testmatch("A(.*)", "Abc", `std.Some ["bc"][:])
testmatch("A(.*)e", "Abcde", `std.Some ["bcd"][:])
testmatch("(a|b)+", "abab", `std.Some ["b"][:])
testmatch("A(b(.*)d)e", "Abcde", `std.Some [
"bcd",
"c"
][:])
testmatch("(a?)(a*)(a?)", "aaaa", `std.Some [
"a",
"aaa",
""
][:])
}
|