|
|
|
|
|
by c0nstantine
503 days ago
|
|
[a-z] is equivalent to 'a|b|...|z' in the normal regex language. So if we do [a-z]:[A-Z] it should be expanded to: (a|b|...|z):(A|B|...|Z) which is pretty legal in trre but has different meaning of mapping any a-z to ALL the A-Z (generating A-Z on each occurrence of lowercase letter). |
|
Distinct syntactic forms can be given distinct semantics, as long as there is rhyme and reason.
Moreover, the right side of the colon is not the normal regex language, it only borrows its syntax. So there, we may be justified in denying that the usual equivalence holds between character class syntax and a disjunction of the symbols denoted by the class.