📜  在字符串 javascript 代码示例中查找大写单词

📅  最后修改于: 2022-03-11 15:01:58.555000             🧑  作者: Mango

代码示例5
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);