The strategy is to create a regex that matches exactly one of the fixed target items, so I use an alternation of literal strings. I escape only those characters that have special meaning in regex (like ., +, (, ), ?, [, ], {, }, / etc.) and leave the other characters as literals. The entire alternation is wrapped with a non-capturing group and anchored using ^ and $. This ensures the regex matches exactly one of these items and nothing else. Below is the final regex pattern string.