Re: grep and regular expression

2006-12-16 Thread Stahlman Family
- Original Message - From: Naim Far [EMAIL PROTECTED] To: vim@vim.org Sent: Thursday, December 14, 2006 8:06 AM Subject: grep and regular expression Hi, I'm writing C++ code, I'm trying to search for all class declaration via the following command: :grep 'class\s*\w\+{' *.hpp

RE: grep and regular expression

2006-12-14 Thread Dan Mergens
Vim does not use strict regular expressions and grep does not use regular expressions for pattern matching. The regular expression 'class\s*\w\+{' would have to match something like this: class ALPHAJunk+{ which I don't think is representative of any class declaration I've seen. You

Re: grep and regular expression

2006-12-14 Thread A.J.Mechelynck
Dan Mergens wrote: Vim does not use strict regular expressions and grep does not use regular expressions for pattern matching. The regular expression 'class\s*\w\+{' would have to match something like this: class ALPHAJunk+{ which I don't think is representative of any class declaration

RE: grep and regular expression

2006-12-14 Thread Dan Mergens
PROTECTED] Sent: Thu 12/14/2006 9:36 AM To: Dan Mergens Cc: Naim Far; vim@vim.org Subject: Re: grep and regular expression Dan Mergens wrote: Vim does not use strict regular expressions and grep does not use regular expressions for pattern matching. The regular expression 'class\s*\w

Re: grep and regular expression

2006-12-14 Thread Charles E Campbell Jr
Dan Mergens wrote: Vim does not use strict regular expressions and grep does not use regular expressions for pattern matching. I find this comment about Vim curious. Do you perhaps mean that Vim does not use Perl's regular expressions? Grep also uses regular expressions, BTW, although

RE: grep and regular expression

2006-12-14 Thread Dan Mergens
. GNU regular expression implementation). From: Charles E Campbell Jr [mailto:[EMAIL PROTECTED] Sent: Thu 12/14/2006 12:54 PM To: Dan Mergens Cc: vim@vim.org Subject: Re: grep and regular expression Dan Mergens wrote: Vim does not use strict regular expressions

Re: grep and regular expression

2006-12-14 Thread Tim Chase
I would have to defer to the regular expression experts, but VIM does not use the standard regular expressions that work on the command line, in say, Linux. Specifically, in the example cited, '/s' was used for whitespace matching, which is not available in standard regular expressions (c.f.

Re: grep and regular expression

2006-12-14 Thread Charles E Campbell Jr
Dan Mergens wrote: I would have to defer to the regular expression experts, but VIM does not use the standard regular expressions that work on the command line, in say, Linux. Specifically, in the example cited, '/s' was used for whitespace matching, which is not available in standard