The simplest way to ensure that our regex matches exactly and only the target items is to use an alternation (a non-capturing group listing each target exactly). Because some characters (like '+', '$', '.', etc.) have special meaning in regex, they are escaped as needed in their literal positions. This pattern is written as a simple string with no leading/trailing slashes, and it will match only those strings that exactly match one of the targets provided.