title: How to parse string with php?
body: <p>I try to parse string with php using <code>sscanf()</code>:</p>
  
  <pre><code>$n = sscanf($line, "%s.%s.%s=%s", $ws, $layer, $perm, $role);
  echo $ws." - ".$layer." - ".$perm." - ".$role."\n";
  </code></pre>
  
  <p>And get output:</p>
  
  <pre><code>*.*.r=* -  -  -
  topp.*.a=jdbs_watcher -  -  -
  </code></pre>
  
  <p>Input examples:</p>
  
  <pre><code> *.*.r=*
   topp.*.a=jdbs_watcher
  </code></pre>
  
  <p>What i expect to see for second string:</p>
  
  <pre><code>topp - * - a - jdbc_watcher
  </code></pre>
  
  <p>Why whole string has been put into <code>$ws</code> variable?</p>