Debian Codegraph @

tests/spec/unit/globals/regular/globals_regular_regex_2.mzn

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