ICode9

精准搜索请尝试: 精确搜索
  • shell 正则匹配2022-08-16 03:01:42

    # shell 数字不支持\d ,只能使用[0-9] if [[ "abcyyy13554221547HelloxxxWorld" =~ yyy([0-9]{11})(Hello)xxx(.*) ]] then echo The regex matches! echo $BASH_REMATCH echo ${BASH_REMATCH[1]} echo ${BASH_REMATCH[2]}

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有