- 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
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
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
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
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
. 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
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.
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