The positive look-ahead (?=
is \@=
in Vim regex, non-capturing groups are \%(\)
and capturing-groups are \(\)
. That would make your pattern:
\s\%(\%([^'"`]*\(['"`]\)[^'"`]*\1\)*[^'"`]*$\)\@=
There is a nice summary for comparing Perl compatible patterns with Vims in the help :h perl-patterns:
Capability |
in Vimspeak |
in Perlspeak |
force case insensitivity |
\c |
(?i) |
force case sensitivity |
\C |
(?-i) |
backref-less grouping |
\%(atom\) |
(?:atom) |
conservative quantifiers |
\{-n,m} |
*?, +?, ??, {}? |
0-width match |
atom\@= |
(?=atom) |
0-width non-match |
atom\@! |
(?!atom) |
0-width preceding match |
atom\@<= |
(?<=atom) |
0-width preceding non-match |
atom\@<! |
(?<!atom) |
match without retry |
atom\@> |
(?>atom) |
That helps translating patterns.