Chealec has pointed out a great deal. X3 is more about matching than anything else, as I have found in testing this command.
So far, this is what I've found to be true:
The Regular Expression
is case sensitive.
Period (.) acts as the wildcard as in normal RegEx. However, the similarities end at that. In normal RegEx, the period is used for a single character; in X3, the period is used as an unlimited number of characters including whitespace and non-alphanumeric characters.
"
. Nova" will return true for "Prototype Nova"
or "Hey, look over there; it's a Nova"
but not "Nova Vanguard".
Caret (^) acts to search for the beginning of a string. This does not search for line-breaks as in normal RegEx.
"
^Nova" will return true for "Nova Vanguard"
or "Novas are really, really tasty"
but not "Prototype Nova".
Dollar Sign ($) acts to search for the end of a string. This does not search for the character or word before a line-break as in normal RegEx.
"
Nova$" will return true for "Prototype Nova"
or "The rain in Argon Prime falls mainly on the Nova"
but not "Nova Vanguard".
Backslash (\) will negate the special character that follows it - caret, dollar sign, period. This differs from normal RegEx where the backslash negates the special character that precedes it.
"
\^ Nova" will return true for "^ Nova"
or "The rain in Argon Prime...look ^ Nova"
but not "Nova".
Brackets ([, ]) create a character class for searching through a series. Such would be [0-9] or [a-d]. These are special characters only when used together.
"
Nova 0[1-5]" will return true for "Nova 05"
but not "Nova 06".
- Caret (^) when used at the beginning of a character class ( [^a-d] ) will turn the character class into the opposite.
"[^abc] Nova" will return true for "D Nova" or "C Nova" but not "a Nova".
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov