Substring check in IF condition in shell script

I want to check if the string has the substring in IF condition then process...

i tried below but not working

if  [[ "$field" = reserved* || "$field" = fillspaces* ]];
then
.............

field can be "reserved1" ....reservedn / fillspaces1 ... fillspacesn

In bash you can use the built-in regexp comparison operator =~

if [[ "$field" =~ reserved.* ]] || [[ "$field" =~ fillspaces.* ]]
then
        ...
fi

i am using ksh .... "=~" is not working

How about using grep command?

if echo "$field" | grep -q "reserved.*"
then
      ...
fi

Builtin solution is to use case in every shell, if [[ ... regexp is not usable.

case "$field" in
     reserverd*|fillspaces* )  some 
                   ;;
esac

ksh93 and bash you can use [[ ]] testing with patterns. Condition Test.

It's not same as [ / test cmd.

a=teststring

if [[ $a = tes* ]] ; then
        echo y1
fi
if [[ $a = tes*r* ]] ; then
        echo y2
fi
if [[ $a = *g ]] ; then
        echo y3
fi
if [[ $a = *g*1 ]] ; then   # false, no echo
        echo y4
fi