=~ matches strings with regular expressions.
You use single quotes so you don't need to double escape escape sequences like
function Hi() if "hello" =~ 'hel.o' echo "you said hello" else echo "you didn't say hello" endif endfunction
:call Hi() will print
you said hello.