title: PowerShell regex and e.164 telephone numbers
body: <p>I'm looking for telephone numbers that have exactly 12 or 13 digits. </p>
  
  <p>The following two regex work:</p>
  
  <pre><code>PS C:\Data\UMCP&gt; $bla = [regex]'^(\+[3][9])?([0-9]\d{9})$'
  PS C:\Data\UMCP&gt; $twelv -match $bla
  True
  PS C:\Data\UMCP&gt; $bla = [regex]'^(\+[3][9])?([0-9]\d{10})$'
  PS C:\Data\UMCP&gt; $thirt -match $bla
  True
  </code></pre>
  
  <p>But</p>
  
  <pre><code>PS C:\Data\UMCP&gt; $bla = [regex]'^(\+[3][9])?([0-9]\d{9} | ^\+[3][9])?([0-9]\d{10})$'
  PS C:\Data\UMCP&gt; $thirt -match $bla
  True
  PS C:\Data\UMCP&gt; $twelv -match $bla
  False
  </code></pre>
  
  <p>How should I use the <code>|</code> or? </p>