
match() match() 메서드는 문자열이 정규식과 매치되는 부분을 검색합니다. match() //"문자열".match(검색값) const str1 = "javascript reference"; const currentStr1 = str1.match("javascript") //[javascript] const currentStr2 = str1.match("reference") //[reference] const currentStr3 = str1.match("r") //[r] const currentStr4 = str1.match(/reference/) //[reference] const currentStr5 = str1.match(/Reference/) //null const currentStr6 ..
Javascript
2022. 8. 22. 14:23
공지사항