tests/spec/unit/globals/regular/globals_regular_regex_4.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | expected: |
| 4 | - !Result |
| 5 | solution: !Solution |
| 6 | x: [1, 1, 1, 2, 2, 4, 4, 4, 4, 4] |
| 7 | - !Result |
| 8 | solution: !Solution |
| 9 | x: [1, 1, 1, 1, 2, 2, 4, 4, 4, 4] |
| 10 | - !Result |
| 11 | solution: !Solution |
| 12 | x: [1, 1, 1, 1, 1, 2, 2, 4, 4, 4] |
| 13 | ***/ |
| 14 | |
| 15 | include "regular_regexp.mzn"; |
| 16 | |
| 17 | array [1..10] of var 1..4: x :: add_to_output; |
| 18 | |
| 19 | constraint regular(x, "1{3,5} 2{2} 4+"); |