<p>I need a well tested Regular Expression (.net style preferred), or some other simple bit of code that will parse a USA/CA phone number into component parts, so:</p>

<ul>
<li>3035551234122</li>
<li>1-303-555-1234x122</li>
<li>(303)555-1234-122</li>
<li>1 (303) 555 -1234-122</li>
</ul>

<p>etc...</p>

<p>all parse into:</p>

<ul>
<li>AreaCode: 303</li>
<li>Exchange: 555</li>
<li>Suffix: 1234</li>
<li>Extension: 122</li>
</ul>

This is the one I use:
```
```
^(?:(?:[\+]?(?<CountryCode>[\d]{1,3}(?:[ ]+|[\-.])))?[(]?(?<AreaCode>[\d]{3})[\-/)]?(?:[ ]+)?)?(?<Number>[a-zA-Z2-9][a-zA-Z0-9 \-.]{6,})(?:(?:[ ]+|[xX]|(i:ext[\.]?)){1,2}(?<Ext>[\d]{1,5}))?$
```
```
I got it from
RegexLib
I believe.