thank you for all above :)

On 1月13日, 上午2时13分, Christian Ebert <[email protected]> wrote:
> > how can i did this?
>
> [^"]abcd[^"]
>

> which of course would also match abcde, so perhaps:
>
> [^"]\<abcd\>[^"]
>

this will match "i'm abcd in quote". witch is mustn't matched. so i
can't use this...


On 1月13日, 上午2时30分, Andy Wokula <[email protected]> wrote:
>
> /\v%(^[^"]*%(%("%(\\.|[^\\"])*")[^"]*)*)@<=abcd
>
> makes sure that 0 or more fully quoted parts do match from the start of
> the line up to the "actual" match for "abcd" in the same line.
> basically an even number of quotes is required left from "abcd", but
> within a quoted part, escaped quotes (and other escaped chars) are
> skipped.
>     :h pattern
>     :h /\v
>     ...
>

this is even match "aaa abcd " abcd....(two of this...) so i can't use
this.



On 1月13日, 上午2时36分, xulxer <[email protected]> wrote:
> use negative look-ahead and look-behind, something like:
>
> \("\)\@<!abcd\("\)\...@!
>
> should work. [^"]abcd[^"] will not work if abcd stand at the beginning or end
> of a line.

okay, if you insist, it must be /\v(^.*".*)@<!abcd(.*")@!. this is
very good, but, it always match:

" trick string ... " . this is should matched abcd . "trick string ...
"

so... didn't prefect, isn't it?

i have thought a while, i think i need the pattern that can describe
the idea "match pattern one, and except pattern two, even if pattern
one is matched". Does Vim has this way?

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to