Tuesday, October 7, 2014

Re: Regular Expressions: How to restrict match extension to the first occurrence?

On 7 October 2014 12:12, Asis Hallab <asis.hallab@gmail.com> wrote:
> Dear Christian,
>
> as requested I explain my test of the suggested solutions.
>
> I tried three regular expressions and used
> :set hlsearch
> to see the matched region.

This option will highlight ALL matched regions. One of these regions
will be "glm::", another will be "something lmg::", so it will
highlight everything up to the second ::. If you want to only ever
match the first one on the line, prepend your search with ^ (to match
the start of the line).

Al

--
--
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/d/optout.

No comments: