[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep --perl-regexp and empty match
From: |
Paul Jarc |
Subject: |
Re: grep --perl-regexp and empty match |
Date: |
Thu, 03 Jul 2003 15:03:10 -0400 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
Jori Mantysalo <address@hidden> wrote:
> I was trying to get "one" and "two" from string "<B>one</B> and
> <B>two</B>".
I'd use sed for that, not grep.
> So, doing it with perl-style regexp:
> grep -o -P '<B>.*?</B>'
> well, that works.
$ echo "<B>one</B> and <B>two</B>" | grep -o -P '<B>.*?</B>'
grep: The -P option is not supported
$ grep --version|sed q
grep (GNU grep) 2.5.1
Are you sure you're using GNU grep?
paul