On Tuesday, July 29, 2014 9:20:02 PM UTC+1, Ben Fritz wrote: > On Tuesday, July 29, 2014 3:10:56 PM UTC-5, Tim Brosnan wrote: > > > I initially send a version of this message through the google groups > > > interface, but it seems to have disappeared. Apologies if there is > > > duplication. > > > > > > When going through some regex examples from > > > VimRegexTutor(https://github.com/dahu/VimRegexTutor) I found that one of > > > the examples did not match the provided text when run in 7.4.383. Here > > > is the regex and the sample text: > > > > > > *30* : Find Text between HTML tags > > > > > > > /\%(<\1>\)\@<=.*\%(<\/\(\w\+\)>\)\@= > > > > > > OR > > > > > > /\v%(\<\1\>)@<=.*%(\<\/(\w+)\>)@= > > > < > > > <level>Can I play, daddy?</level> > > > > > > Neither of the provided regexs would watch the sample text (it should > > > match the text between html tags). However, when I tried 7.1.42 (only > > > other version at hand) I found that the text between tags was matched > > > correctly. Both versions were fun as -u NONE and "set nocompatible" to > > > try to rule out option or plugin clashes. > > > > > > Is this is a bug or has regex behaviour changed between 7.1.42 and 7.4.383? > > > > I think this is the same issue reported here: > > > > https://groups.google.com/d/topic/vim_dev/07qFhT34nEI/discussion > > > > Probably it is caused by the new regular expression engine introduced > > in 7.4. See :help new-regexp-engine and :help two-engines for more > > details. The new engine is designed in a way that backreferences are > > really difficult. In the thread I link above Bram calls it a "miracle" > > that they work at all. > > > > :help 'regexpengine' provides a possible workaround for you until this > > gets fixed. Try doing ":set regexpengine=1" to see if that fixes it for > > you temporarily until the problem is fixed.
Ah, it seems like this is the problem. ":set regexpengine=1" gives the correct behaviour. I didn't know about "version7.txt", it certainly makes tracking differences between updates easier. Thanks for your help. -- -- 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/d/optout.
