CompuServe Thread

#Wildcards

2 messages in this thread
#10518From: Mike BarnesSep 8, 1988 8:57 PM
Where can I find information on "wildcards"? There is no documentation that I can find in the Amiga manuals.
#10538From: Doug WingerSep 8, 1988 10:15 PM
You'll find it in the AmigaDOS manual, the one put out by Bantam. Meanwhile… ? matches any single char. % matcher the null string (not used very often 8) #[pat] matches 0 or more of the pattern [pat] a|b matches a or b. () group pattern (used to indicate a chosen pattern) #? will match and number of any character. (everything) thing(#ab) will match anything stating with 'thing', and containing any number of 'ab' afterwards. (thingab, thingabab, thingababab) A#BC will match ABC, ABBC, ABBBBC, etc. A?BC will match ABC, AXBC, A BC, AWBC, etc. A#?BC will match AntythingBC, AltogetherBC, ABC, etc. A#? will match _anything_ starting with 'A'. A(B|C) will match AB or AC. AB|CD will match AB or CD As you can see, you can combine them together to procduce a very flexible wildcard. Think of ? as 'any character' and # as 'any number of..'