switcher provides a similar syntax to a switch statement in JavaScript but with RegExp as cases