ããããªã¼ã¦ã§ã¢ã®ã¤ã³ã¹ãã¼ã«ç¨bashããã°ã©ã ãè¦ã¦ããã次ã®æ§ãªãã®ããã£ããï¼ä»¥ä¸ã®ä¾ã¯ç°¡ç¥åãã¦ãããï¼ STRING="abc" if [[ "$STRING" =~ "^ab[cd]$" ]]; then echo "matched" else echo "unmatched" fi ifæã®æ¡ä»¶è¡¨ç¾ã®ä¸ã«â=~âã¨ãããªãã¬ã¼ã¿ããããmanãè¦ã㨠=~ ãªãã¬ã¼ã¿ã¯æååãæ£è¦è¡¨ç¾ã¨æ¯è¼ããã¨ãããç¥ããªãã£ããbashã®æååæ¯è¼ã§æ£è¦è¡¨ç¾ã使ããã¨ã¯ãç§ã¯æ£è¦è¡¨ç¾æ¯è¼ãå¿ è¦ãªæã¯grepã«å°ããã¦å¤æãã¦ããã®ã ããããã使ãã°ç°¡åã«ã§ããã ã¨ããããã ãä¸ã®ããã°ã©ã ãæå¾ éãã«åããªããä¸ã®ä¾ã§ã¯ =~ ã®å·¦è¾ºã¨å³è¾ºã®æ£è¦è¡¨ç¾ã¯ãããããã¯ãã ããçµæã¯âunmatchedâãè²ã ã¨æ£è¦è¡¨ç¾ãå¤ãã¦ã¿ãããã©ãã¨ãã¦ãããã³ã°ããªããããããifæã次ã®ããã«
{{#tags}}- {{label}}
{{/tags}}