This tutorial describes the syntax of regular expressions in Praat.
A regular expression (regex) is a text string that describes a set of strings. Regular expressions are useful as a way to search for patterns in text strings and, optionally, replace them by another pattern.
Some regular expressions match only one string, i.e., the set they describe has only one member. For example, the regex "ab" matches the string "ab" and no others. Other regular expressions match more than one string, i.e., the set they describe has more than one member. For example, the regex "a*" matches the string made up of any number (including zero) of "a"s. As you can see, some characters match themselves (such as "a" and "b"), and these characters are called ordinary characters. The characters that do not match themselves, such as "*", are called special characters or metacharacters. Many special characters are only special characters in the search regex and are ordinary characters in the substitution regex.
You can read the rest of this tutorial sequentially with the help of the "<1" and ">1" buttons.
More in depth coverage of regular expressions can be found in Friedl (1997).
© David Weenink & Paul Boersma, April 1, 2018