2004년 5월 25일 화요일

vim regular expression Tip(find, replace 예제)

1
2
3
4
5

tms search1.sayclub.com neo search1.sayclub.com
tms search2.sayclub.com neo search2.sayclub.com
tms search3.sayclub.com neo search3.sayclub.com
tms search4.sayclub.com neo search4.sayclub.com
tms search5.sayclub.com neo search5.sayclub.com
로 치환할 때
:%s/\(.*\)/tms search\1.sayclub.com neo search\1.sayclub.com/g

공백을 개행문자로 치환할때 (ctrl + v + 엔터)
:s/ /^M/g

fprintf 혹은 LOG_DEBUG를 찾을 때
/fprintf\|LOG_DEBUG

댓글 없음:

댓글 쓰기