TradeStation Development Environment
The following table lists valid regular expressions that you can use with the Find and Replace commands.
You cannot use regular expressions with the Find in Files feature.
Regular Expression | Description |
. | Any single character. |
[ ] | Any one of the characters contained in the brackets, or any of an ASCII range of characters separated by a hyphen. For instance, b[aeiou]d matches bad, bed, bid, bod and bud. x[0-9] matches x0, x1, x2, and so on. If the first character in the brackets is ^ (caret), then the regular expression matches any characters except those in the brackets. Bracketed characters followed by a + (plus) match one or more of the bracketed characters so that r[eo]+d matches red, rod, reed, and rood as well as reod, rooed, and roed. |
^ | The beginning of a line. |
$ | The end of a line. |
( ) | For Find, the sequence of characters between the parentheses will be matched. For instance, (ju)+fruit finds jufruit, jujufruit, jujujujufruit, and so on. Note that it will not find jfruit, ufruit, or ujfruit because the sequence ju is not in any of those strings. |
(c|c) | Any one of the characters separated by the alternation symbol (|). For instance, (j|u)}+fruit finds jfruit, jjfruit, ufruit, ujfruit, uufruit, and so on. |
* | None or more of the preceding character or expression. For instance, ba*c matches bc, bac, baac, baaac, and so on. |
+ | At least one or more of the preceding character or expression. For instance, ba+c matches bac, baac, baaac, but not bc. |
[^ ] | Any character except those following the ^ character (caret) in the brackets, or any of an ASCII range of characters separated by a hyphen. For instance, x[^0-9] matches xa, xb, xc, and so on, but not x0, x1, x2, and so on. |
\e | Predefined expression, where \e can be: |
\d | Any decimal digit. |
\n | End-of-line. |
\w | Any alphanumeric character. |
\ | Disables the pattern match characteristic in the Find What box from the special characters listed above. For instance, 100$ matches 100 at the end of a line, but 100\$ matches the character string 100$ anywhere on a line. |