Or:
PREFIXES = ""
PREFIXES<2> = CHANGE("71 83 96"," ",@VM) ; * two-character prefixes
PREFIXES<3> = CHANGE("771 843 946"," ",@VM) ; * three-character prefixes
* The Change is just a convenient way to convert space-delimited data to VM-delimited
FOR CHARS = 2
TO 3
LOCATE(ID[1,CHARS],PREFIXES,CHARS;POS) THEN ; * matched!
Not elegant? Well, it's about as elegant as a bunch of IF clauses...
If the number of characters is consistent (not 71 and 771, but Only 2 chars or Only 3 chars), there's also this:
IFR PREFIXES<2> = ID<2>[1,2]
The IFR statement returns true of the second argument is present in any element of the first argument. Put that into a loop as above to replace the hardcoded '2' with a variable number of
characters.
More concisely however, it's not a big deal to create a %function which does something like this:
IF %matches(ID,REGEXP.PATTERN) THEN ...
So does D3 BASIC support wildcards? Well, yeah, but it's more like a frozen pizza than take-out - everything is there, you just need to cook it yourself.