title: Regex - Repleace "//" with " "
body: <p>Some trouble with an RegEx for PhoneNumbers, it works so far but i cant figure out how to Repleace "//" with Spaces:</p>
  
  <p>Input: 0()()()111 1-11*<em>//</em>*1111</p>
  
  <p><strong>Expected</strong>:: +49 111 111 1111</p>
  
  <p><strong>Got</strong>: +49 111 1111111</p>
  
  <pre><code>$pattern = array(
              '/[^0-9\+\.\-\(\) ]/',   // Cut all characters that are not allowed
              '/^00/',                 // Start with 00 ist changed to +
              '/^(0)(\d)/',            // Start with 0[1-9] ist changed to +49 [0-9]
              '/[\.\-\(\)]/',          // Change allowed characters to ' '
              '/\s[\s]+/',             // Change grouped spaces too one
              '/((\+49 )(0))(.*)/'
          );
  
  $change = array('', '+', '+49 $2', ' ', ' ', '$2$4');
  $value = preg_replace($pattern, $change, $value);
  </code></pre>
  
  <p>Added Chars to:</p>
  
  <pre><code> '/[\.\-\(\)]/',          // Change allowed characters to ' '
  </code></pre>
  
  <p>wich does not work. Sorry my knowledge about Regex is limited.</p>