You are quite close, here is the corrected regex:
I applied the folloing changes:
$anchor to the end
-to the end of the character class
See the Regex101-Demo with some unit tests.