Tuesday, October 2, 2012

Re: Problem with a regular expression in Vim

Thanks. But "aaa" and "bbb" are merely examples for indicating that
what I want to match is the contents between a pair of "==".
Enumerating of the contents doesn't meet my requirement.

On Wed, Oct 3, 2012 at 11:17 AM, Adam <lespea@gmail.com> wrote:
> /==\zs\%(aaa\|ddd\)\ze==/ works
> ~Adam~
>
>
> On Tue, Oct 2, 2012 at 9:37 PM, Xell Liu <xell.liu@gmail.com> wrote:
>>
>> Hi all,
>>
>> Suppose this text fragment:
>>
>> xxx==aaa==bbbccc==ddd==yyy
>>
>> How can I match the "aaa" and "ddd" between the pair of "==" without
>> matching the bbbccc (or, of course, "xxx" or "yyy")? Apparently
>> /==\zs[^=]\{-}\ze==/ fails. However /==[^=]\{-}==/ does match the
>> "aaa" and "ddd" WITH the pair of "==". I got lost here.
>>
>> Thanks very much!
>>
>> Cheers,
>> Xell
>>
>> --
>> You received this message from the "vim_use" maillist.
>> Do not top-post! Type your reply below the text you are replying to.
>> For more information, visit http://www.vim.org/maillist.php
>
>
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: