-w, --word-regexp
Match only whole words.
An option of grepx.
Usage
grepx -w PATTERNS [FILE]...
grepx --word-regexp PATTERNS [FILE]...Details
| Short | Long | Value | Default | Meaning |
|---|---|---|---|---|
-w | --word-regexp | none | match only whole words |
Examples
Search a source tree for a whole word, with file names and line numbers
grepx -rnw 'TODO' srcsrc/main.go:42: // TODO: handle the empty caseHelp in the terminal
gnux help grepx --word-regexp