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