<aside> ❗ 문자열을 검색하고 대체하고 추출하는 데 사용 가능한 일종의 패턴이다.
</aside>
// 생성자 방식
new RegExp('표현', '옵션')
// 리터럴 방식
/[표현]/옵션
정규식.test(문자열)
const str = 'the quick fox brown~~'
/the/.test(str)
문자열.match(정규식)
const str = 'the quick fox brown~~'
str.match(/quick/)
str.replace(정규식, 대체문자열)
const str = 'the quick fox brown~~'
str.replace(/quick/, 'fast')
const regexp = /표현/gim