#!/bin/ksh
if [[ $1 = {3}(\d) ]]; then
echo Match
fi
2) match Low or HiGh case-insensitive
normal sh/bash usage: [ $1 = low -o $1 = high ], case-insensitive need shell option nocasematch enabled
#!/bin/ksh
if [[ $1 = @(~(i:low|high)) ]]; then
echo Match
fi
more info "man ksh"
?(pattern-list )
Optionally matches any one of the given patterns.
*(pattern-list )
Matches zero or more occurrences of the given patterns.
+(pattern-list )
Matches one or more occurrences of the given patterns.
{n }(pattern-list )
Matches n occurrences of the given patterns.
{m ,n }(pattern-list )
Matches from m to n occurrences of the given patterns. If m is omitted, 0 will be used. If n is omitted at least m occurrences will be matched.
@(pattern-list )
Matches exactly one of the given patterns.
!(pattern-list )
Matches anything except one of the given patterns