정규표현식 연습에 관해서...
글쓴이: hoony / 작성시간: 금, 2006/06/23 - 2:40오후
vi에서 정규표현식 연습을 하고 있습니다.
vi 보다 편하게 실습해 볼수 있는 환경이 있나요?
정규표현식을 이리저리 바꿔 가면서 테스트 할려면
긴 표현식의 경우 한문자만 바꾸기 위해서도 다시 타이핑 해야 되는데요.
vi의 ex모드에서 이전에 타이핑 했던 정규표현식을 다시 수정해서 쓸수 있는 방법이 있나요?
아니면 좀더 효율적으로(사용했던 정규표현식을 조금씩 고쳐가며) 연습해 볼수 있는 방법이 있나요?
Forums:
화살표 위로 누르면
화살표 위로 누르면 전에 했던것 history 될텐데...
무언가 환경 설정이 잘 못 되신듯...
한 번 확인 해보세요.
<어떠한 역경에도 굴하지 않는 '하양 지훈'>
#include <com.h> <beer.h> <woman.h>
do { if (com) hacking(); if (money) drinking(); if (women) loving(); } while (1);
#include <com.h> <C2H5OH.h> <woman.h>
do { if (com) hacking(); if (money) drinking(); if (women) loving(); } while (1);
: 아니면 /
: 아니면 / 누른다음에 위아래 화살표 누르면 이전에 썼던 정규표현식으로 이동 가능합니다.
아니면, perl이 깔리지 않은 환경은 거의 없으니까 perl의 문법을 조금만 배워 쉘에서 연습하는 것도 좋습니다.
vim 설정에서 set
vim 설정에서
set incsearch
해 주시고 '/' 누른후 정규식 쓰면 실시간으로 매칭되는 문자열 보여집니다.
ex 모드에서는 실시간으로 반응하지 않더군요. 그래도 위 방법으로 미리 연습해보면 한결 낫습니다.
ex 모드에서 위,아래, C-P, C-N 키도 활용하시구요.
--
마잇
--
마잇
단지 정규표현식만
단지 정규표현식만 연습하시는거라면
제 생각엔 에디터 플러스가 가장 편하더군요..
댓글 달기