Regex Help - Greedy vs. Non-Greedy
Bob Hall
rjhjr0 at gmail.com
Wed Sep 9 17:00:36 UTC 2009
On Wed, Sep 09, 2009 at 09:15:25AM -0700, Drew Tomlinson wrote:
> I'm trying to do a search and replace in vim. I have lines like this:
> http://site1/dir/;
> http://site2/dir/;LastName, FirstName;Phone;
> http://site3/dir/;LastName, FirstName;
> http://site4/dir/;
>
> I'm want to match "http:*" and stop matching at the first ";". My basic
> regex is:
>
> /http:.\+;/
Use "{-}" in place of "+".
/http:.\{-};/
More information about the freebsd-questions
mailing list