grep - Bugs: bug #24452, grep -w doesn't always grab whole...
You are not allowed to post comments on this tracker with your current authentication level.
bug #24452: grep -w doesn't always grab whole words - broken multibyte support
Submitter: | Jean-Baptiste Lallement <jblallement> | ||
Submitted: | Sat 04 Oct 2008 08:48:51 PM UTC | ||
Category: | None | Severity: | 3 - Normal |
Item Group: | None | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open |
Jump to the original submission
Wed 29 Jun 2011 06:33:54 AM UTC, comment #6: |
Paolo Bonzini <bonzini> |
Tue 28 Jun 2011 10:37:47 PM UTC, comment #5: Related issue: https://savannah.gnu.org/bugs/index.php?32337
|
-X- <slavazanko> |
Tue 28 Jun 2011 10:35:26 PM UTC, comment #4:
|
-X- <slavazanko> |
Tue 28 Jun 2011 08:28:29 AM UTC, comment #3: What regular expression engine are you using? \p is certainly not supported by grep or glibc. |
Paolo Bonzini <bonzini> |
Fri 24 Jun 2011 10:24:02 AM UTC, comment #2: See latest attach. This patch should fix this issue.
|
-X- <slavazanko> |
Fri 05 Nov 2010 09:02:04 AM UTC, comment #1:
|
-X- <slavazanko> |
Sat 04 Oct 2008 08:48:51 PM UTC, original submission:
I'm reporting this for a Ubuntu user.
rusty@vivaldi:~$ grep -w alloca devel/kernel/linux-2.6/kernel/pid.c | grep -w alloca
rusty@vivaldi:~/devel/kernel/patches/linux-2.6$ locale
|
Jean-Baptiste Lallement <jblallement> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2011-06-24 | slavazanko | Attached File | - | Added 0001-Fixed-issue-24452-grep-w-doesn-t-always-grab-whole-w.patch, #23552 | |
2010-11-05 | slavazanko | Attached File | - | Added 0001-Fixed-issue-24452-grep-w-doesn-t-always-grab-whole-w.patch, #21931 | |
2008-10-04 | jblallement | Attached File | - | Added pid.c, #16607 |
Powered by Savane 3.13-4448.
Corresponding source code
The code you patched is for POSIX regular expression, not PCRE. Did you test the patch? PCRE handles this with \b, which is also buggy:
$ echo x | grep -Pw 'a?'
x
$ echo x | grep -w 'a?'
$
So I'll probably apply a variant of your patch to handle the PCRE case.