On Wednesday 09 September 2009 18:15:25 Drew Tomlinson wrote:
> I'm trying to do a search and replace in vim. I have lines like this:
> http://site2/dir/;LastName, FirstName;Phone;
> http://site3/dir/;LastName, FirstName;
> I'm want to match "http:*" and stop matching at the first ";". My basic
> regex is:
> But it's matching *all* the semi-colons. Thus I've Googled and tried
> various incatations to try and make my regex "non-greedy" but I can't
> seem to come up with the correct combination.
> How can I write a regex that stops matching at the first semi-colon?
AFAIK, there's no greediness modifier in vim regex. However, you can use
character classes to solve your problem:
email@example.com mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"