regex and switch case to allow testing based on URL parameters