title: bash substring regex matching wildcard
body: <p>I am doing bash , i try to test if the substring "world" in the given variable x. I have part of code working. But the other one not working. I want to figure out why</p>
  
  <p>First one is working</p>
  
  <pre><code>x=helloworldfirsttime
  world=world
  if [[ "$x"  == *$world* ]];then
      echo matching helloworld
  </code></pre>
  
  <p>Second one is not working</p>
  
  <pre><code>x=helloworldfirsttime
  if [[ "$x"  == "*world*" ]];then
      echo matching helloworld
  </code></pre>
  
  <p>How to make second one work without using variable like the 1st method</p>
  
  <p>Can someone fix the second one for me.. thanks</p>