EasyManua.ls Logo

Alcatel-Lucent AOS-W 6.5.3.x - Page 1068

Alcatel-Lucent AOS-W 6.5.3.x
1160 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
That command uses the syntax: s/pattern_to_match/pattern_to_substitute.
Operator Description Sample Result
^ Match at the beginning of a
line
s/^/blah/ Inserts “blah” at the beginning
of the line
$ Match at the end of a line s/$/blah/ Inserts “blah” at the end of the
line
\< Match at the beginning of a
word
s/\</blah/ Inserts “blah at the beginning
of the word
egrep “\<blah
sample.txt
Matches blahfield, etc.
\> Match at the end of a word s/\>/blah/ Inserts “blah at the end of the
word
egrep “\>blah
sample.txt
Matches soupblah, etc.
\b Match at the beginning or end
of a word
egrep “\bblah”
sample.txt
Matches blahcake and
countblah
\B Match in the middle of a word egrep \Bblah”
sample.txt
Matches sublahper, etc.
Table 261: Regular expression anchors
References
This implementation is based, in part, on the following resources:
n Lonvick, C., “The BSD syslog Protocol, RFC3164, August 2001
n Regular expression (regex) reference: http://en.wikipedia.org/wiki/Regular_expression
n Regex syntax summary: http://www.greenend.org.uk/rjk/2002/06/regexp.html
n Basic regular expression (BRE) syntax: http://builder.com.com/5100-6372-1050915.html
AOS-W 6.5.3.x | User Guide External Services Interface | 1068

Table of Contents