08 switchで正規表現
var
str
=
'hogehoge'
;
switch
(
true
){
case
/hoge/
.
test
(
str
):
break
;
case
/abcd/
.
test
(
str
):
break
;
}
javascript