<< back | ![]() |
![]() |
![]() |
AmigaDOS Pattern
This section is for people that are not familiar with AmigaDOS pattern on version 2.0 of the Amiga operating system or higher. The patterns are fairly extensive, and approximate some of the ability of Unix/grep "regular expression" patterns. Here are the available tokens:
? Matches a single character. # Matches the following expression 0 or more times. (ab|cd) Matches any one of the items seperated by '|'. ~ Negates the following expression. It matches all strings that do not match the expression (aka ~(foo) matches all strings that are not exactly "foo"). [abc] Character class: matches any of the characters in the class. [~bc] Character class: matches any of the characters not in the class. a-z Character range (only within character classes). % Matches 0 characters always (useful in "(foo|bar|%)"). * Synonym for "#?", not available by default in 2.0. Available as an option that can be turned on. "Expression" in the above table means either a single character (ex: "#?"), or an alternation (ex: "#(ab|cd|ef)"), or a character class (ex: "#[a-zA-Z]").