diff options
| author | Jonas Maier <jonas@x77.dev> | 2026-06-02 21:44:30 +0200 |
|---|---|---|
| committer | Jonas Maier <jonas@x77.dev> | 2026-06-02 21:44:30 +0200 |
| commit | dbca276ac60af603209f62dcc2e0e1fcfbebae11 (patch) | |
| tree | 7a7f368a1d8caf1d041bbf8327c5ef362115489f /test-cases/case2_lookahead | |
| parent | 5647a7645739fa2aa2dea4fe059b4efe84a278bc (diff) | |
| download | pish-dbca276ac60af603209f62dcc2e0e1fcfbebae11.tar.gz | |
better case_match command
Diffstat (limited to 'test-cases/case2_lookahead')
| -rw-r--r-- | test-cases/case2_lookahead/script.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test-cases/case2_lookahead/script.sh b/test-cases/case2_lookahead/script.sh index a77eb85..891441b 100644 --- a/test-cases/case2_lookahead/script.sh +++ b/test-cases/case2_lookahead/script.sh @@ -48,3 +48,18 @@ match x2 xfoobar_some_more_stuff yes match x2 x___bar no match x2 xfoo___ no match x2 xfoo no + +fun x3 { + case $1 { + x(?!(a|b)).* { echo yes } + .* { echo no } + } +} +match x3 x yes +match x3 xa no +match x3 xb no +match x3 xax no +match x3 xbx no +match x3 xxa yes +match x3 xxb yes +match x3 xfoobar yes |
