|
:::::::::::::::::::::::::
:: REGULAR_EXPRESSIONS ::
:::::::::::::::::::::::::
"Regular expressions" are signs used for searching purposes. They are
used in OpenBCM in files "convert.bcm", "reject.bcm" and most search
processes.
Sign Description
^ finds beginning of a line at the beginning of a string
$ finds end of line at the end of string
. finds any sign
* after string, finds every search string followed with any sign (or no
sign), e.g.: "bo*" finds "bot", "bo" and "boo" etc but not "b"
+ after string finds every search string followed with any sign but
no further signs, e.g.: "bo+" finds "boo" and "booo", but not "bo"
and "be"
\ means to use following sign as search string, e.g.: "\^" finds "^"
and didn't search for beginning of line
[ ] finds every single sign, e.g. [bot] finds b, o or t
[^] this means negation, e.g. [^bot] finds all signs but no b, o or t
[-] means a rangs of letters, e.g. [b-o] finds every letter between
b and o
The use of curved brackets (means "{" or "}") can't be used in OpenBCM,
although in other implementations of regular expressions they are common.
Examples:
^[WE][WU]$ finds as search string "WW", "WU", "EW" or "EU"
^S\: finds "S:" only at beginning of search string
| |