📌  相关文章
📜  bash "=~" 示例 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:36.959000             🧑  作者: Mango

代码示例1
$ [[ 45 =~ [0-9]+ ]] && echo "45 contains digits"
45 contains digits

$ [[ "hello" =~ [0-9]+ ]] && echo "hello doesnt contains digits"
$ [[ "hello" =~ [a-z]+ ]] && echo "hello contains alphabets"
hello contains alphabets