As far as I remember, case does not use regex, but globbing. Similar, but different enough to make you scratch your head when something is not working.
If you need regex, nested if with =~ is the way to go.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.