更新时间:2023-02-17 23:40:53
Bash case does not use regular expressions, but shell pattern matching only.
因此,应该使用模式ws*.host.com
(或ws-+([0-9]).host.com
)代替正则表达式ws-[0-9]+\.host\.com
,但这看起来有点高级,我从没尝试过:-)
Therefore, instead of regex ws-[0-9]+\.host\.com
you should use pattern ws*.host.com
(or ws-+([0-9]).host.com
, but that looks a bit advanced and I've never tried that :-)