문제

:%s/早上好/good morning/g can substitute 早上好 with good morning, but :%s/\(早上好\s+\)\+/good morning/g can not substitute 早上好 早上好 with good morning .
How can i write the right regular expression in vim?

도움이 되었습니까?

해결책

Try this:

%s_\(早上好\s*\)\+_good morning_gi   
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top