tests/spec/unit/globals/regular/globals_regular_regex_3.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | solvers: [gecode, chuffed] |
| 4 | options: |
| 5 | all_solutions: true |
| 6 | expected: !Result |
| 7 | solution: !SolutionSet |
| 8 | - !Solution |
| 9 | x: [1, 4, 1, 4] |
| 10 | - !Solution |
| 11 | x: [1, 4, 2, 4] |
| 12 | - !Solution |
| 13 | x: [1, 4, 3, 4] |
| 14 | ***/ |
| 15 | |
| 16 | include "regular_regexp.mzn"; |
| 17 | |
| 18 | array [1..4] of var 1..4: x :: add_to_output; |
| 19 | |
| 20 | constraint regular(x, "1 [^1 2 3] [1-3] 4"); |