regular expression mobile and landline number
<p>i want to have a mobile phone number in this format (021)123-4567 or (027)123-4567 or landline number in this format (04)970-0676. i have a regular expression which does that except it doesn't contain the '-' and the first 3 or 2 digits are wrapped in the curly brackets (027) or (04) character.<br>
what I want also is after the brackets is to have a hypen after the third digit e.g (04)970- &lt; or (027)635- &lt;</p>

<p>this is what I have.</p>

<pre><code>(^\([0][2]\d{1}\))(\d{6,8}$) 
</code></pre>

<p>or this one which shows the possible codes and possible number of characters in phone number this one here is what i kinda want except for the hypen is missing. </p>

<pre><code>'/^(\((03|04|06|07|09)\)\d{7})|(\((021|022|025|027|028|029)\)\d{6,8})|((0508|0800|0900)\d{5,8})$/'
</code></pre>
