JSFiddle - React, Tailwind, and code Playground JavaScript var string = 'hello! how! are! you! ?'; if(string.match('[^;]+[^!]')){ alert("match"); }