We need a regex that matches exactly each of the 20 target items (6 emails, 4 phone numbers, 4 dates, 4 IDs, and 2 HTML tags) and nothing else. The simplest way is to use an alternation that lists the literal strings for each target item. For special characters (like ., +, (, ), etc.) that have meaning in regex we escape them so they match their literal values. We then wrap the alternation in a non‐capturing group with the start (^) and end ($) anchors so that the entire string must match one of the alternatives. Thus, for example, the email "john.doe+tag@sub.domain.co.uk" is represented as "john\.doe\+tag@sub\.domain\.co\.uk", and similarly for the others. This guarantees that if the regex matches, it is exactly one of the provided tokens.