There are are a few finite values that my variable $_GET['action'] can take, either "new", "edit", or "delete".
I want to sanitize my input for security and make sure the variable is only one of those above values, how can I do that using regular expressions?
I don't want to go and say:
if(isset($_GET['action']) && ($_GET['action'] == 'new' || $_GET['action'] == 'edit' || $_GET['action'] == 'delete'))