We create a pattern that exactly matches one of the given target items by using a non-capturing group with alternation. Each literal is escaped for special regex characters as needed. For instance, plus signs, dots, parentheses, hyphens and quotes are escaped. The pattern is anchored with ^ and $ so that it matches exactly one of the target items and nothing else.