Pattern matching

A simple form of pattern matching is employed, where * represents zero or more characters, ? a single character, and expressions like [A-Z] represent ranges of characters. Remember that these characters are only special when tested as a pattern. In any other context they are characters within a string.

Pattern matches are applied to the entire string value of the variable being tested. If you need to check for a substring then add a * character at the beginning and/or end of the pattern.

For more complex pattern matches, use the embedded Perl commands (see “Perl extensions”).