Web Dev/8. 메모
정규표현식
hYhY1234
2021. 2. 24. 11:58
728x90
www.youtube.com/watch?v=Gg0tlbrxJSc&ab_channel=MINIMILAB
정규표현식: 문자열에 특정한 규칙이 있는 경우, 이를 추출하기 위해 사용하는 것
- 직접 라우터를 만들어보는데 이때 parameter나, fragment를 추출할때 사용한다.
- 이를 통하면 복잡한 처리가 줄어든다
- 쉽게 사용할 수 있는 곳: regexr.com/
RegExr: Learn, Build, & Test RegEx
RegExr is an online tool to learn, build, & test Regular Expressions (RegEx / RegExp).
regexr.com
- developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
Regular expressions - JavaScript | MDN
You construct a regular expression in one of two ways: Using a regular expression literal, which consists of a pattern enclosed between slashes, as follows: let re = /ab+c/; Regular expression literals provide compilation of the regular expression when the
developer.mozilla.org