bash added a =~ operator in bash 3.0 (in 2004). Using extended regular expressions. That was added shortly after by ksh93 and zsh as well (again with differences).
ksh93 and bash-3.2 and above (when the compat31 option is not enabled) use quoting to escape regexp operator causing all sorts of confusion and meaning it can't be used with the [ command there. zsh doesn't have that problem (quotes are used for shell quoting, and backslash to escape regex operator as usual), so the =~ operator works in zsh's [ command (though itself needs quoted since =foo is a filename expansion operator in zsh).