ça dépend du shell. Bash 3.0 permet ceci :

if [[ string =~ regex ]]