[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Grep-devel] look ahead capture content :(
From: |
Marc Chantreux |
Subject: |
[Grep-devel] look ahead capture content :( |
Date: |
Mon, 4 Mar 2019 16:16:00 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
hello people,
I would like to use grep instead of sed in this particular context
sed 's/^Channel \+//;t;d' <<\.
Channel foo
Rocket bang
Channel bar
.
the result is
foo
bar
i expected the same result with
grep -Po '(?=^Channel +).*' <<\.
Channel foo
Rocket bang
Channel bar
.
but instead, i got
Channel foo
Channel bar
is there a bug? a misuse of mine ?
regards
marc
- [Grep-devel] look ahead capture content :(,
Marc Chantreux <=