bash 判断字符串

Submitted by lepton on Wed, 05/11/2016 - 16:24



[[ "${str}" =~ ^-?[[:digit:]]*$ ]]  //正则表达式 不能加引号

expr match "$str" "^-\?[0-9]*$"

判断字符串 包含 123

[[ "${str}" == *"123"* ]]


golden goose shoes (not verified)

Wed, 04/21/2021 - 12:47

My spouse and i were peaceful that Peter managed to complete his studies by way of the ideas he gained while using the weblog. It's not at all simplistic to just happen to be making a gift of methods other people have been selling. And now we acknowledge we have the website owner to give thanks to for that. The explanations you made, the simple web site navigation, the relationships you can assist to create - it is all excellent, and it's facilitating our son in addition to us imagine that the situation is cool, and that's really indispensable. Thank you for the whole thing!
golden goose shoes

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.