Regexp
搜尋中文與英文字母
var re = /\w+|[\u0800-\u9fa5]+/g變數加上表達式
const findPropsReg = new RegExp(`${fileName}.propTypes(.|\n)+.+`, 'g')Match所有字元包含換行
(.|\n)+Match 直到某個字
(.|\n)+?(?=到某個字)exec vs match
Invalid regular expression: /({/: Unterminated group
Last updated