In vim regex:
If /foo\(bar\)\@=/ matches foo followed by bar
Then what matches bar following foo?
I tried /\(foo\)\@=bar/ but it doesn’t seem to work.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This:
You should use positive lookbehind(instead of lookahead) operator, because you’re trying to match bar, preceeded by foo.
BTW, here is the link, which I always use as a cheatsheet for vim regex operators