This solution uses a single alternation: each valid string is reproduced exactly (with proper escaping of special regex characters and literal backslashes, plus \n where newlines must match). Since no partial or incorrect substrings can satisfy these exact literal patterns, only the specified 19 items are matched.