Regular Expression: 10 digits with dash on position 3,4 or 5 : <p>Im trying to verify an inputfield with regular expression. The user can enter a 10 digit number which can contain a dash on position 3,4 or 5. When i use only one expression, it works, but I can't get it to work with or-statements.
Offcourse it would be a solution to trim al the dashes, but i would like to do it this way.</p>

<p>Examples which should be allowed</p>

<pre><code>0123456789
01-23456789
012-3456789
0123-456789
</code></pre>

<p>What I think should work</p>

<pre><code>(^d{10}$)|
(^d{2}\-d{8}$)|
(^d{3}\-d{7}$)|
(^d{4}\-d{6}$)
</code></pre>
