'string'.match(/regex/); console.log('The 1quick5'.match(/[0-9]/g)); // ['1', '5'] /regex/.test('string'); console.log(new RegExp('foo*').test('table football')); //true