Regex Help - Greedy vs. Non-Greedy

2009-09-09 Thread Drew Tomlinson
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:.\+;/ But it's

Re: Regex Help - Greedy vs. Non-Greedy

2009-09-09 Thread Daniel Bye
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

Re: Regex Help - Greedy vs. Non-Greedy

2009-09-09 Thread Mel Flynn
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://site1/dir/; http://site2/dir/;LastName, FirstName;Phone; http://site3/dir/;LastName, FirstName; http://site4/dir/; I'm want to match http:* and stop

Re: Regex Help - Greedy vs. Non-Greedy

2009-09-09 Thread Drew Tomlinson
Daniel Bye wrote: 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

Re: Regex Help - Greedy vs. Non-Greedy

2009-09-09 Thread Drew Tomlinson
Drew Tomlinson wrote: Daniel Bye wrote: 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;

Re: Regex Help - Greedy vs. Non-Greedy

2009-09-09 Thread Bob Hall
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

Re: Regex Help - Greedy vs. Non-Greedy

2009-09-09 Thread George Davidovich
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