| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
[[test]] |
| 13 |
name = "greedy" |
| 14 |
regex = '(abc)+' |
| 15 |
haystack = "abcabcabc" |
| 16 |
matches = [ |
| 17 |
[[0, 9], [6, 9]], |
| 18 |
] |
| 19 |
anchored = true |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
[[test]] |
| 24 |
name = "greedy-earliest" |
| 25 |
regex = '(abc)+' |
| 26 |
haystack = "abcabcabc" |
| 27 |
matches = [ |
| 28 |
[[0, 3], [0, 3]], |
| 29 |
[[3, 6], [3, 6]], |
| 30 |
[[6, 9], [6, 9]], |
| 31 |
] |
| 32 |
anchored = true |
| 33 |
search-kind = "earliest" |
| 34 |
|
| 35 |
[[test]] |
| 36 |
name = "nongreedy" |
| 37 |
regex = '(abc)+?' |
| 38 |
haystack = "abcabcabc" |
| 39 |
matches = [ |
| 40 |
[[0, 3], [0, 3]], |
| 41 |
[[3, 6], [3, 6]], |
| 42 |
[[6, 9], [6, 9]], |
| 43 |
] |
| 44 |
anchored = true |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
[[test]] |
| 49 |
name = "nongreedy-all" |
| 50 |
regex = '(abc)+?' |
| 51 |
haystack = "abcabcabc" |
| 52 |
matches = [ |
| 53 |
[[0, 9], [6, 9]], |
| 54 |
] |
| 55 |
anchored = true |
| 56 |
match-kind = "all" |
| 57 |
|
| 58 |
[[test]] |
| 59 |
name = "word-boundary-unicode-01" |
| 60 |
regex = '\b\w+\b' |
| 61 |
haystack = 'βββ☃' |
| 62 |
matches = [[0, 6]] |
| 63 |
anchored = true |
| 64 |
|
| 65 |
[[test]] |
| 66 |
name = "word-boundary-nounicode-01" |
| 67 |
regex = '\b\w+\b' |
| 68 |
haystack = 'abcβ' |
| 69 |
matches = [[0, 3]] |
| 70 |
anchored = true |
| 71 |
unicode = false |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
[[test]] |
| 77 |
name = "no-match-at-start" |
| 78 |
regex = '.c' |
| 79 |
haystack = 'abc' |
| 80 |
matches = [] |
| 81 |
anchored = true |
| 82 |
|
| 83 |
|
| 84 |
[[test]] |
| 85 |
name = "no-match-at-start-bounds" |
| 86 |
regex = '.c' |
| 87 |
haystack = 'aabc' |
| 88 |
bounds = [1, 4] |
| 89 |
matches = [] |
| 90 |
anchored = true |
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
[[test]] |
| 96 |
name = "no-match-at-start-reverse-inner" |
| 97 |
regex = '.c[a-z]' |
| 98 |
haystack = 'abcz' |
| 99 |
matches = [] |
| 100 |
anchored = true |
| 101 |
|
| 102 |
|
| 103 |
[[test]] |
| 104 |
name = "no-match-at-start-reverse-inner-bounds" |
| 105 |
regex = '.c[a-z]' |
| 106 |
haystack = 'aabcz' |
| 107 |
bounds = [1, 5] |
| 108 |
matches = [] |
| 109 |
anchored = true |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
[[test]] |
| 114 |
name = "no-match-at-start-reverse-anchored" |
| 115 |
regex = '.c[a-z]$' |
| 116 |
haystack = 'abcz' |
| 117 |
matches = [] |
| 118 |
anchored = true |
| 119 |
|
| 120 |
|
| 121 |
[[test]] |
| 122 |
name = "no-match-at-start-reverse-anchored-bounds" |
| 123 |
regex = '.c[a-z]$' |
| 124 |
haystack = 'aabcz' |
| 125 |
bounds = [1, 5] |
| 126 |
matches = [] |
| 127 |
anchored = true |