checking if a substring exists in a string bash

Shell
string='Haystack';

if [[ $string =~ "Needle" ]]
then
   echo "It's there!"
fi
Source

Also in Shell: