tests/spec/unit/globals/regular/globals_regular_regex_5.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, 2] |
| 10 | - !Solution |
| 11 | x: [2, 2] |
| 12 | ***/ |
| 13 | |
| 14 | include "regular_regexp.mzn"; |
| 15 | |
| 16 | array [1..2] of var 1..4: x :: add_to_output; |
| 17 | |
| 18 | constraint regular(x, "1? 2 *"); |