Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Effective Java 3/e
- spring cloud
- npm
- Regular expression
- REACT
- Chunk
- MySQL
- Spring Batch
- eslint
- log_bin
- REACTJS
- java
- git
- Webpack
- Express
- nodejs
- migration
- 정규표현식
- 퀵소트
- current_date
- upgrade
- Effective Java
- regex
- Node
- mysql 5.5
- JavaScript
- spring
- expire_logs_days
- update
- log4j2
Archives
- Today
- Total
728x90
목록대괄호 (1)
728x90
내 세상
[React] Regex/정규표현식/Regular Expression
EX) [2021-12-10][16:04:32] 와 같은 Date에 대괄호가 쳐져있을 때의 처리 대괄호를 제거 하여 내부의 값을 빼어내기 위함. let splitDate = exampleDate.match(/\[[^\]]*\]/g); const startDate = splitDate[0].replace(/[\[\]]/g, ""); const startTime = splitDate[1].replace(/[\[\]]/g, ""); 위의 예시 [2021-12-10][16:04:32] 를 적용할 경우, splitDate = [ "[2021-12-01]", "[16:04:32]" ]; // Array startDate = "2021-12-01"; startTime = "16:04:32";
Technical/React
2021. 12. 10. 16:16