I solved this by taking every target item and turning it into a literal match using proper escaping only for characters that have special meaning in regex. For example, dots (.) and plus signs (+) in email addresses are escaped, as are parentheses in phone numbers and function calls; the question mark in the URL is escaped too. I then joined all 20 alternatives with the | operator and wrapped the entire alternation in a non‐capturing group anchored with ^ and $. This ensures that the regex will match exactly only one of the given items and nothing else.