x/masx200_leetcode_test/detect-capital/index.ts
1234export default function detectCapitalUse(word: string): boolean { return /(^[A-Z]+$)|(^[a-z]+$)|(^[A-Z][a-z]+$)/g.test(word);}