StarWing schrieb: > how can i did this? i want match abcd which is not in quote. e.g: > abcd //match > "abcd" //mismatch > "\"abcd" //mismatch > "\"ab" abcd //match > > how can i did this?
/\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 ... -- Andy --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---