The RE consumes the string left to right, evaluating the first alternative first. In the case of three backslashes the first two are consumed by the first alternative, leaving the third backslash for another sub-rule. (There are also three backslashes in the test.)