// String with some numbers const str = "Hello12345World!"; // Regular expression const regex = /d/; // Check if string contians numbers const doesItHaveNumber = regex.test(str); console.log(doesItHaveNumber); // true