The regex in question became somewhat famous after the VimCast at 
http://vimcasts.org/episodes/vimgolf-prime-numbers/

Here's the setup:

C<Tab>1<Esc>qq<C-A>>>Ypq540@q

>From here, the following command is used to remove lines with a composite 
>number ot tabs:

:g/\v^(<Tab><Tab>+)\1+</d<CR>

On Vim 7.4.91, this regex uses the NFA engine, and fails to match the correct 
number of tabs. When manually switching engines by prepending \%#=1 to the 
regex, it works correctly.

By removing the < at the end of the regex, like this:

\v^(\t\t+)\1+

and searching with 'hlsearch' on, you can see how many tabs are matched. The 
old engine correctly matches the highest composite number of tabs possible in 
each line. The NFA engine matches a number of tabs equal to the highest number 
in: 4, 6, 10, 18, 34, 66, 130, 258, 514. What the pattern is, I don't know.

-- 
-- 
You received this message from the "vim_dev" 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 because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui