Thursday, February 13, 2014

my old regex stopped working in v7.4

Let's say I want to match the last word ('xxx') in a string like this:

'aaaaa bbb cccc ... xxx'

This regex used to work in v7.3:

.*\zs\<.*

In v7.4, that regex now matches the whole string. That seems to violate the longest-match semantics. In fact, the result is the same, even if I replace the second '*' by '\{,}'.

And if I replace '\<' with '\s', then I do get just the last word (with the preceding space, of course). So I would say the implementation for '\<' is buggy.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: