title: preg_match if statement does only go into else part
body: <p>My code is as followed:</p>
  
  <pre><code> public function validateTIME($param) 
      {
          $item = $param-&gt;Item;  
          $value = $item-&gt;configValue-&gt;TextBox-&gt;Text;
  
              if(preg_match('^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$', "$value"))
              {
                  echo 'nice';    
              }
  
  
              else{ echo "$value";
                    echo 'wrong';
                  }   
      }
  </code></pre>
  
  <p>My question is why it does only go into the else part and not in the if one.
  The regex pattern is HH:MM (Hour=H Minute=M) and the pattern is ok.</p>