๐ย Reference
๐ Chapter
Regular expression
match()
- match()
- ๋ฌธ์์ด์์ ์ ๊ท์๊ณผ ๋งค์น ๋๋ ๋ถ๋ถ์ ๊ฒ์ํ๊ณ ๋ฐฐ์ด๋ก ๋ฐํํ๋ค.
str.match(regexp)
regexp
- ์ ๊ท์ ๊ฐ์ฒด์ด๋ค.
- RegExp๊ฐ ์๋ ๊ฐ์ฒด obj๊ฐ ์ ๋ฌ๋๋ฉด, new RegExp(obj)๋ฅผ ์ฌ์ฉํ์ฌ ์๋ฌต์ ์ผ๋ก RegExp๋ก ๋ณํ๋๋ค.
- ๋งค๊ฐ๋ณ์๋ฅผ ์ ๋ฌํ์ง ์๊ณ match()๋ฅผ ์ฌ์ฉํ๋ฉด, ๋น ๋ฌธ์์ด:[""]์ด ์๋ Array๊ฐ ๋ฐํ๋๋ค.