var str="good wood food cat bat hat";
console.log( str.match(/(g|w|f)ood/g) );
Ответ:
[ 'good', 'wood', 'food' ]
JavaScript test | #JavaScript
JA JavaScript test @js_test · 9.67K subscribers var str="good wood food cat bat hat";
console.log( str.match(/(g|w|f)ood/g) );