|Top Previous Next|
Regular expression matching allows you to test whether a string fits a specific syntactic shape. You can also search a text string for a sub-string that fits a pattern.
A regular expression describes a set of strings. The simplest case is one that describes a particular string; for example, the string foo when regarded as a regular expression matches foo and nothing else. Nontrivial regular expressions use special constructs with which they can match more than one string. For example, the regular expression foo|bar matches either the string foo or the string bar; the regular expression c[ad]*r matches any of the strings cr, car, cdr, caar, cadddar and all other such strings with any number of a's and d's.
The Bat! allows the use of regular expressions in these places:
Templates (using macros)
To learn about Regular Expressions, you can read the following topics: