[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep -w and \w -pattern
From: |
Jori Mantysalo |
Subject: |
Re: grep -w and \w -pattern |
Date: |
Mon, 2 Jun 2003 17:15:22 +0300 (EEST) |
On Mon, 2 Jun 2003, Stepan Kasal wrote:
>> address@hidden jori]$ echo "dogs dogs and dogs" | grep -o -w "\w\w\w"
> For now, please don't use -o in combination with -w.
> Use \< and \> instead
Workaround works. However, I would like to point that bug is not
about using -o with -w: you can also see bug when you say
echo "dogs dogs and dogs" | grep --color=always -w "\w\w\w"
-o works in combination -w. For example to split text to words, one can
say:
grep -w -o -E "\w+" sometext.txt
I found bug when I tried to get all three-letter words from text.
--
Jori Mäntysalo