May 2018
Beginner
252 pages
6h 19m
English
If the starting character is either an X or a Y, such as in X123 or Y108, we can use "X" | "Y", where | stands for or, so the expression reads like "X" or "Y":
xy: ["X" | "Y"]parse "X123" [xy some digit] ;== trueparse "Y108" [xy some digit] ;== true
| can be used for a small number of choices, but if there are more than a few choices, it is better to make a charset and use that in the pattern:
uz: charset "UVWXYZ"parse "X123" [uz some digit] ;== trueparse "V456" [uz some digit] ;== true
=> Now answer questions 4 and 5 from the Questions section.