From dbca276ac60af603209f62dcc2e0e1fcfbebae11 Mon Sep 17 00:00:00 2001 From: Jonas Maier Date: Tue, 2 Jun 2026 21:44:30 +0200 Subject: better case_match command --- test-cases/case2_lookahead/script.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test-cases/case2_lookahead') 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 -- cgit v1.2.3