Examples

  1. The pattern [A-Z][0-9A-Z.]{0,} matches any filename that begins with a letter that is followed only by letters or numbers, and may contain one or more dots.

  2. The pattern [!.]{1,} matches any filename that does not contain a dot. Literally, the pattern means: Match any name that contains one or more occurrences of any character that is not a dot.

  3. The pattern *TXT* matches any filename that contains the string ``TXT'', either in the beginning, at the end, or in the middle.

  4. Again, the pattern * matches any filename. The pattern *.* matches any filename that contains a dot. Note that *.* will not match a filename that doesn't contain a dot! This is important to remember!