MicroStation CONNECT Edition Help

Regular Expressions

Regular expressions are special character combinations that help you perform different operations, such as searching for variable forms of text and selecting multiple items when specifying the name of a cell, reference, or level.

The following is a list of regular expressions that are common for all operations:

Character Meaning
^ Beginning of a line or expression. When used at the beginning of an expression, indicates that a line must start with the following pattern. When used as the first character in a character class, negates the definition.
$ End of line or expression. When used at the end of an expression, indicates that a line must end with the preceding pattern.
. Any single character.
[:alpha:] An ASCII alphabetic character (equivalent to character class [a-z or A-Z]).
\d An ASCII digit (equivalent to character class [0-9]).
[:alnum:] An ASCII alphabetic character or digit (equivalent to character class [a-z or A-Z or 0-9]).

Also, a colon followed by a space matches any punctuation character.

The following is a list of regular expressions used only for searching text.

Character Meaning
[ ] Characters within these brackets describe a character class, or a custom wildcard.
* The preceding character (or character class) is allowed to repeat zero.
+ The preceding character (or character class) must repeat at least once.
- When used within a character class, represents a character range.

The following is a list of regular expressions used only for selecting multiple items.

Character Meaning
c Any non-special character c matches itself.
\c Turn off special meaning of character c.
[…] Any one of characters in …; ranges like a-z are legal.
[^…] Any single character not in …; ranges are legal.
s* Zero or more occurrences of string s (the preceding character).
s+ One or more occurrences of string s (the preceding character).
st String s followed by string t.