I used an online regex tester to build a simple regex, however using php's preg_match it's giving an unknown modifier for $.
Here is the regex:
if (preg_match('/(^Keyword1/$|^Keyword2/$)/', $input, $matches))
What I'm trying to do is check if $input equals either Keyword1/ or Keyword2/ (exact match). I know I can easily do this with "if ($input == 'Keyword1/')" however I'd rather have a few lines of regex vs a dozen if statements in the code.
Anyone help me out?