Regex with logical not

2010-07-21 Thread Chris Sutcliffe
Hi All, I'm trying to do a search in a file for all lines that do not contain an '@' and I'm having a hard time figuring out the proper regex. Any help would be greatly appreciated. Thank you! Chris -- Chris Sutcliffe http://emergedesktop.org http://www.google.com/profiles/ir0nh34d -- You r

Re: Regex with logical not

2010-07-21 Thread Adam
/^...@]*$/ If you want to do something to the lines you can use the :v/@/ For example: clear the 'c' register qcq Find all the lines and copy them into the 'c' register :v/@/y C ~Adam~ On Wed, Jul 21, 2010 at 10:57, Chris Sutcliffe wrote: > Hi All, > > I'm trying to do a search in

Re: Regex with logical not

2010-07-21 Thread lessthanideal
On Jul 21, 4:57 pm, Chris Sutcliffe wrote: > I'm trying to do a search in a file for all lines that do not contain > an '@' 1) This regex isn't using a logical not, it positively search for lines that don't include that character. ^...@]*$ 2) Depending on your task, maybe you could use the :v

Re: Regex with logical not

2010-07-21 Thread Benjamin Esham
Chris Sutcliffe wrote: > Hi All, > > I'm trying to do a search in a file for all lines that do not contain an > '@' and I'm having a hard time figuring out the proper regex. Any help > would be greatly appreciated. Hi Chris, Please see http://vim.wikia.com/wiki/Search_for_lines_not_containing