Docs Linux Downloads Search Packages Ubuntu pack Get Ubuntu Search .deb Search RPM Error log Distros Softwares Help & Man Pages Others Contact |
Escaped-angle-brackets-mark-word-boundariesEscaped-angle-brackets-mark-word-boundaries.Escaped-angle-brackets-mark-word-boundaries HistoryHide minor edits - Show changes to markup Added lines 1-41:
(:Google1:) (:Googletxt:) Escaped angle brackets mark word boundaries.The angle brackets must be escaped, since otherwise they have only their literal character meaning. (:table border=1 width=50% bgcolor=yellow cellspacing=0 :) (:cellnr:) Escaped "angle brackets" -- \<...\> -- mark word boundaries. The angle brackets must be escaped, since otherwise they have only their literal character meaning. "\<the\>" matches the word "the," but not the words "them," "there," "other," etc. bash$ cat textfile This is line 1, of which there is only one instance. This is the only instance of line 2. This is line 3, another line. This is line 4. bash$ grep 'the' textfile This is line 1, of which there is only one instance. This is the only instance of line 2. This is line 3, another line. bash$ grep '\<the\>' textfile This is the only instance of line 2. (:tableend:) Reference : http://tldp.org (:Googlemm:) |