[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: repetition operator +
From: |
Matthew Wakeling |
Subject: |
Re: repetition operator + |
Date: |
Fri, 3 Jul 2009 16:45:31 +0100 (BST) |
User-agent: |
Alpine 2.00 (DEB 1167 2008-08-23) |
On Fri, 3 Jul 2009, address@hidden wrote:
Shouldn't "a\n" match the regular expression a+ in the following case?
$ echo a | grep 'a'
a
$ echo a | grep 'a*'
a
$ echo a | grep 'a+'
$
See the section "Basic vs Extended Regular Expressions" in the grep man
page.
$ echo a | grep "a\+"
a
$ echo a | grep -E "a+"
a
Matthew
--
Doctor: Are you okay? You appear to be injured.
Neelix: Aaaaaaah!
Doctor: It's okay, it looks superficial.
Neelix: Am I going to die?
Doctor: Not unless you are allergic to tomatoes. This appears to be a sauce
some kind.