📅  最后修改于: 2022-03-11 15:01:17.285000             🧑  作者: Mango
const str = "HERE'S AN UPPERCASE PART of the string";
const upperCaseWords = str.match(/(\b[A-Z][A-Z]+|\b[A-Z]\b)/g);
console.log(upperCaseWords);