HP 6125XLG R2306-HP 6125XLG Blade Switch Fundamentals Configuration Guide - Page 18

Characters, Meaning, Examples, er\B matches verb, but not never or

Page 18 highlights

Characters \N [ ] [^] {n} {n,} {n,m} \< \> \b \B \w Meaning Examples Matches the preceding strings in parentheses, with the Nth string repeated once. "(string)\1" matches a string containing "stringstring". "(string1)(string2)\2" matches a string containing "string1string2string2". "(string1)(string2)\1\2" matches a string containing " string1string2string1string2". Matches a single character in the brackets. "[16A]" matches a string containing 1, 6, or A; "[1-36A]" matches a string containing 1, 2, 3, 6, or A (- is a hyphen). To match the character "]", put it immediately after "[", for example, []abc]. There is no such limit on "[". Matches a single character that is not in the brackets. "[^16A]" matches a string that contains at least one character other than 1, 6, or A, such as "abc". A match can also contain 1, 6, or A (such as "m16"), but it cannot contain these three characters only (such as 1, 16, or 16A). Matches the preceding character n times. The number n must be a nonnegative integer. "o{2}" matches "food", but not "Bob". Matches the preceding character n times or more. The number n must be "o{2,}" matches "foooood", but not "Bob". a nonnegative integer. Matches the preceding character n to m times or more. The numbers n and m must be nonnegative integers and n cannot be greater than m. "o{1,3}" matches "fod", "food", and "foooood", but not "fd". Matches a string that starts with the pattern following \. A string that contains the pattern is also a match if the characters following the pattern are not digits, letters, or underscores. "do\>" matches "undo" and "cdo". Matches a word that starts with the pattern following \b or ends with the pattern preceding \b. "er\b" matches "never", but not "verb" or "erase". "\ber" matches "erase", but not "verb" or "never". Matches a word that contains the pattern but does not start or end with the pattern. "er\B" matches "verb", but not "never" or "erase". Same as [A-Za-z0-9_], matches a digit, letter, or underscore. "v\w" matches "vlan" and "service". 11

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155

11
Characters
Meaning
Examples
\N
Matches the preceding strings in
parentheses, with the
Nth
string
repeated once.
"(string)\1" matches a string containing
"stringstring".
"(string1)(string2)\2" matches a string
containing "string1string2string2".
"(string1)(string2)\1\2" matches a string
containing " string1string2string1string2".
[ ]
Matches a single character in the
brackets.
"[16A]" matches a string containing 1, 6, or A;
"[1-36A]" matches a string containing 1, 2, 3, 6,
or A (- is a hyphen).
To match the character "]", put it immediately
after "[", for example, []abc]. There is no such
limit on "[".
[^]
Matches a single character that is
not in the brackets.
"[^16A]" matches a string that contains at least
one character other than 1, 6, or A, such as
"abc". A match can also contain 1, 6, or A (such
as "m16"), but it cannot contain these three
characters only (such as 1, 16, or 16A).
{n}
Matches the preceding character
n
times. The number
n
must be a
nonnegative integer.
"o{2}" matches "food", but not "Bob".
{n,}
Matches the preceding character
n
times or more. The number
n
must be
a nonnegative integer.
"o{2,}" matches "foooood", but not "Bob".
{n,m}
Matches the preceding character
n
to
m
times or more. The numbers
n
and
m
must be nonnegative integers
and
n
cannot be greater than
m
.
"o{1,3}" matches "fod", "food", and "foooood",
but not "fd".
\<
Matches a string that starts with the
pattern following \<. A string that
contains the pattern is also a match if
the characters preceding the pattern
are not digits, letters, or underscores.
"\<do" matches "domain" and "doa".
\>
Matches a string that ends with the
pattern preceding \>. A string that
contains the pattern is also a match if
the characters following the pattern
are not digits, letters, or underscores.
"do\>" matches "undo" and "cdo".
\b
Matches a word that starts with the
pattern following \b or ends with the
pattern preceding \b.
"er\b" matches "never", but not "verb" or
"erase".
"\ber" matches "erase", but not "verb" or
"never".
\B
Matches a word that contains the
pattern but does not start or end with
the pattern.
"er\B" matches "verb", but not "never" or
"erase".
\w
Same as [A-Za-z0-9_], matches a
digit, letter, or underscore.
"v\w" matches "vlan"
and "service".