Support grep's "-w" flag [PATCH]
Open
auto-migrated
Priority-Medium
Type-Defect
- Dominant language
- Go
- Stars
- 4k
- Forks
- 403
- PR merge metrics
- No merged PRs in 30d
Description
```
It's nice to be able to search for 'whole words', which is to say making sure
the pattern has a word boundary at the beginning and end.
Having to type '\bpattern\b' is annoying, and grep/ack already have a -w flag
which does this for you.
Since we already have -i which adjusts the pattern, I think adding another one
isn't to terrible.
I've attached a patch that does this.
```
Original issue reported on code.google.com by `dgryski` on 17 Feb 2012 at 1:13
Attachments:
- [csearch-w.patch](https://storage.googleapis.com/google-code-attachments/codesearch/issue-13/comment-0/csearch-w.patch)
Contributor guide
Assessment
This issue has not been assessed yet.