Regular Expressions
Regular Expressions
Regular expressions (regex or regexp) are extremely useful in extracting information from any text by searching for one or more matches of a specific search pattern (i.e. a specific sequence of ASCII or Unicode characters).
Smart-Utils uses the following regexp patterns to find matching IDs, Tags, Labels ..etc of network elements under search.
* Any string
? Single character of string
# Single digit of string
@ Single alphabetic character
. Single non-alphabetic character
~ Anything except pattern
[ ] Any enclosed character
[~] Any character not enclosed
[-] A range of single characters
, Separates two patterns
\\ Single backslash
` Read next character literally by defining the node visibility type, a set of nodes
Examples:
The text under search in the following examples can be Node ID, Tag, Labels, Diameter...etc.
To search for text that starts with MH and ends with a number (e.g MH-01 or MH123) use MH*# when prompted
To search for text that has _ (underscore) in it use *_* when prompted
To search for text that ends with A or B or C use *[ABC] when prompted
To search for text that doesn't ends with A or B or C use *[~ABC] when prompted