We construct a regex pattern that uses a non-capturing group to match exactly one of the target items. Each special character in the target strings is escaped appropriately (such as dot, plus, parenthesis and hyphen when needed) to ensure the regex matches exactly the provided items. The pattern is wrapped with ^ and $ anchors to ensure that nothing else is matched. The final regex alternates between all the target items, each individually escaped as needed.