var s = "Please yes make my day!"; s.match(/yes.*day/); // Returns null s.match(/yes[^]*day/); // Returns 'yes make my day'