blob: 30b412ca65079d449ec007f52e216adafbed5ae6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
[[test]]
name = "1"
regex = "(?i)abc"
haystack = "ABC"
matches = [[0, 3]]
[[test]]
name = "2"
regex = "(?i)a(?-i)bc"
haystack = "Abc"
matches = [[0, 3]]
[[test]]
name = "3"
regex = "(?i)a(?-i)bc"
haystack = "ABC"
matches = []
[[test]]
name = "4"
regex = "(?is)a."
haystack = "A\n"
matches = [[0, 2]]
[[test]]
name = "5"
regex = "(?is)a.(?-is)a."
haystack = "A\nab"
matches = [[0, 4]]
[[test]]
name = "6"
regex = "(?is)a.(?-is)a."
haystack = "A\na\n"
matches = []
[[test]]
name = "7"
regex = "(?is)a.(?-is:a.)?"
haystack = "A\na\n"
matches = [[0, 2]]
match-limit = 1
[[test]]
name = "8"
regex = "(?U)a+"
haystack = "aa"
matches = [[0, 1]]
match-limit = 1
[[test]]
name = "9"
regex = "(?U)a+?"
haystack = "aa"
matches = [[0, 2]]
[[test]]
name = "10"
regex = "(?U)(?-U)a+"
haystack = "aa"
matches = [[0, 2]]
[[test]]
name = "11"
regex = '(?m)(?:^\d+$\n?)+'
haystack = "123\n456\n789"
matches = [[0, 11]]
unicode = false
|