match()1 [javascript]match() match() match() 메서드는 문자열을 검색하고 배열을 반환합니다. const str1 = "javascript reference"; const currentStr1 = str1.match("javascript"); const currentStr2 = str1.match("reference"); const currentStr3 = str1.match("r"); const currentStr4 = str1.match(/reference/); const currentStr5 = str1.match(/Reference/); const currentStr6 = str1.match(/Reference/i); //대소문자 구별x const currentStr7 = str1.match(/r/g); const .. 2022. 8. 22. 이전 1 다음 728x90