ourstring = "example" if string.match(ourstring,"ex") then print(ourstring.." contains ex!" end -- OR if string.find(ourstring,"ex") then print(ourstring.." contains ex!" end