Recent Changes - Search:

Linux News.

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-boundaries

Escaped-angle-brackets-mark-word-boundaries.Escaped-angle-brackets-mark-word-boundaries History

Hide minor edits - Show changes to output

August 20, 2012, at 01:26 AM by 15.211.153.75 -
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:)
Edit - History - Print - Recent Changes - Search
Page last modified on August 20, 2012, at 01:26 AM