3 [[ ab/../ == @(ab|+([^/]))/..?(/) ]] && echo match 1
5 [[ ab/../ == +([^/])/..?(/) ]] && echo match 2
7 [[ ab/../ == @(ab|?b)/..?(/) ]] && echo match 3
9 [[ ab/../ == +([^/])/../ ]] && echo match 4
11 [[ ab/../ == +([!/])/..?(/) ]] && echo match 1a
13 [[ ab/../ == @(ab|+([!/]))/..?(/) ]] && echo match 1b
15 [[ ab/../ == +([!/])/../ ]] && echo match 2a
17 [[ ab/../ == +([!/])/..?(/) ]] && echo match 2b
19 [[ ab/../ == +([!/])/..@(/) ]] && echo match 3a
21 [[ ab/../ == +(ab)/..?(/) ]] && echo match 3b
23 [[ ab/../ == [!/][!/]/../ ]] && echo match 4a
25 [[ ab/../ == @(ab|?b)/..?(/) ]] && echo match 4b
27 [[ ab/../ == [^/][^/]/../ ]] && echo match 5
29 [[ ab/../ == ?b/..?(/) ]] && echo match 6
31 [[ ab/../ == +(?b)/..?(/) ]] && echo match 7
33 [[ ab/../ == +(?b|?b)/..?(/) ]] && echo match 8
35 [[ ab/../ == @(?b|?b)/..?(/) ]] && echo match 9
37 [[ ab/../ == @(a?|?b)/..?(/) ]] && echo match 10
39 [[ ab/../ == ?(ab)/..?(/) ]] && echo match 11
41 [[ ab/../ == ?(ab|??)/..?(/) ]] && echo match 12
43 [[ ab/../ == @(??)/..?(/) ]] && echo match 13
45 [[ ab/../ == @(??|a*)/..?(/) ]] && echo match 14
47 [[ ab/../ == @(a*)/..?(/) ]] && echo match 15
49 [[ ab/../ == +(??)/..?(/) ]] && echo match 16
51 [[ ab/../ == +(??|a*)/..?(/) ]] && echo match 17
53 [[ ab/../ == +(a*)/..?(/) ]] && echo match 18
56 j="@(x)" ; [[ x == $j ]] && echo ok 19