일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- createtextnode
- FOR
- Let
- 학습법 #집중력
- VAR
- Openlayers
- appendChild
- htmlFor
- input
- createElement
- boolean
- const
- Append
- Today
- Total
Atomic Habits
Vim 정규식 본문
\(foo \)\@<=bar\( baz\)\@= matches the “bar” in foo bar baz. But the lookaround groups are still required, so it doesn't match at all for foo bar qux or foo bar or foo.
(foo )@<=bar( baz)@= in very magic mode.
\(mi \)\@<=casa matches “casa” if preceded by “mi ”. So it matches only the first “casa” in mi casa es su casa.
\(mi \)\@<!casa matches “casa” if not preceded by “mi ”. So it matches only the second “casa” in mi casa es su casa.
dad.\@= matches “dad” if followed by a period. So it matches only the second “dad” in My dad is bigger than your dad.
dad.\@! matches “dad” if not followed by a period. So it matches only the first “dad” in My dad is bigger than your dad.
Help
http://vimdoc.sourceforge.net/htmldoc/pattern.html#/\@= < 아래 다양한 예시 !! >
https://vim.fandom.com/wiki/Regex_lookahead_and_lookbehind
Regex lookahead and lookbehind
If you want to search for a pattern only when it occurs next to another pattern, use the regex features “lookahead” and “lookbehind” (collectively “lookaround”). If you want to search for a pattern only when it doesn't occur next to another, us
vim.fandom.com
VIM 정규식
전방탐색/후방탐색
긍정형/부정형
(?=) : \(\)\@= : 긍전
(?<=) : \(\)\@<= : 긍후
(?!) : \(\)\@! : 부전
(?<!) : \(\)\@<! : 부후
3(?=천)
1000원, 3천원, 33원 >>> /3\(\)천\@= >>> 1000원, [3]천원, 33원
(?<=천)원
1000원, 3천원, 33원 >>> /\(\)천\@<=원 >>> 1000원, 3천[원], 33원
3(?!천)원
1000원, 3천원, 33원 >>> /3\(\)천\@!원 >>> 1000원, 3천원, 3[3원]
(?<!천)원
1000원, 3천원, 33원 >>> /\(\)천\@<!원 >>> 1000[원], 3천원, 33[원]