// 語法 // str.search(regexp) // regexp為正規表達式,也可以使用字串 let str = 'What are you supporting in the 2022 FIFA World Cup?'; str.search(/[A-G]/g) // 36 //找大寫A-G,找到F str.search('FIFA') // 36