Regular Expressionhttp://forums.asp.net/t/1797930.aspx/1?Regular+ExpressionSat, 28 Apr 2012 10:05:39 -040017979304955769http://forums.asp.net/p/1797930/4955769.aspx/1?Regular+ExpressionRegular Expression <p>Hi Friends,</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I need Regular Expression for Indian landline number and Mobile Number.</p> <p>For Ex,</p> <p>9911238893-----------&gt;Mobile number.</p> <p>04564-223356</p> 2012-04-28T05:55:29-04:004955785http://forums.asp.net/p/1797930/4955785.aspx/1?Re+Regular+ExpressionRe: Regular Expression <p>try this...</p> <p></p> <p>&lt;asp:RegularExpressionValidator ID=&quot;RegularExpressionValidator2&quot; runat=&quot;server&quot; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ControlToValidate=&quot;txtManagerMobile&quot; ErrorMessage=&quot;Invalid Managar Mobile number!&quot; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Font-Bold=&quot;True&quot; ForeColor=&quot;Red&quot; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ValidationExpression=&quot;^(([0]{1})|([\&#43;][4]{2}))([1]|[2]|[3]|[7]){1}\d{8,9}&#36;&quot; Text=&quot;*&quot; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ValidationGroup=&quot;ValiadtionGRP&quot;&gt;&lt;/asp:RegularExpressionValidator&gt;</p> 2012-04-28T06:14:40-04:004955788http://forums.asp.net/p/1797930/4955788.aspx/1?Re+Regular+ExpressionRe: Regular Expression <p>How can i check and i get this expression by own... how to findout this by ourself...</p> 2012-04-28T06:18:22-04:004955791http://forums.asp.net/p/1797930/4955791.aspx/1?Re+Regular+ExpressionRe: Regular Expression <p>for Mibile use&nbsp; -&gt;<strong> <span id="ctl00_ContentPlaceHolder1_ExpressionLabel"> ^((\&#43;){0,1}91(\s){0,1}(\-){0,1}(\s){0,1}){0,1}9[0-9](\s){0,1}(\-){0,1}(\s){0,1}[1-9]{1}[0-9]{7}&#36;</span></strong></p> <p><strong><span>or&nbsp;&nbsp; <pre class="prettyprint">^9[0-9]{9}$</pre><br> </span></strong></p> <p>for land line&nbsp; :<strong> /^[0-9]\d{2,4}-\d{6,8}&#36;/</strong></p> <p></p> 2012-04-28T06:19:48-04:004955792http://forums.asp.net/p/1797930/4955792.aspx/1?Re+Regular+ExpressionRe: Regular Expression <p>try this for indian mobile number</p> <pre class="prettyprint">&lt;asp:RegularExpressionValidator ID=&quot;revMobileno&quot; ControlToValidate=&quot;txtMobileNo&quot; Text=&quot;*&quot; SetFocusOnError=&quot;true&quot; ErrorMessage=&quot;Enter valid mobile no&quot; Display=&quot;Dynamic&quot; ValidationExpression=&quot;^([789]{1})([0-9]{1})([0-9]{8})$&quot; runat=&quot;server&quot;&gt;&lt;/asp:RegularExpressionValidator&gt;</pre> <p><br> and see link</p> <p>http://forums.asp.net/t/1408910.aspx/1</p> 2012-04-28T06:20:00-04:004955801http://forums.asp.net/p/1797930/4955801.aspx/1?Re+Regular+ExpressionRe: Regular Expression <p>hi</p> <p><a href="http://regexlib.com/(A(hpAHx2w1miL87SLWr-kxwPrMvxthFw3Bo6rwW077IEnYuNfwn8qlwfLc601oHjd0xQ4VQZARlXUMT_tuD7uXjuYA8-VmmXV5_htmuwZmM3iKJyI3HEiaTeFOhpmihlGm5AEqcXsNL9LdmK_Edo_BGP76scVM6sG_xnVR8_IwTNhMCjWbybr14RYpgTmtUMAg0))/DisplayPatterns.aspx?cattabindex=6&amp;categoryId=7">http://regexlib.com/(A(hpAHx2w1miL87SLWr-kxwPrMvxthFw3Bo6rwW077IEnYuNfwn8qlwfLc601oHjd0xQ4VQZARlXUMT_tuD7uXjuYA8-VmmXV5_htmuwZmM3iKJyI3HEiaTeFOhpmihlGm5AEqcXsNL9LdmK_Edo_BGP76scVM6sG_xnVR8_IwTNhMCjWbybr14RYpgTmtUMAg0))/DisplayPatterns.aspx?cattabindex=6&amp;categoryId=7</a></p> 2012-04-28T06:26:27-04:004955805http://forums.asp.net/p/1797930/4955805.aspx/1?Re+Regular+ExpressionRe: Regular Expression <pre class="prettyprint">pls go through this it will help u www.regular-expressions.info/reference.html</pre> <p></p> <p></p> 2012-04-28T06:26:39-04:004955813http://forums.asp.net/p/1797930/4955813.aspx/1?Re+Regular+ExpressionRe: Regular Expression <p><span class="postbody"><strong><span style="font-family:times new roman,serif">Validation expression =&quot;^[0-9]{10}&quot;</span></strong> </span></p> <p><span><br> </span><span class="postbody" style="font-family:times new roman,serif">[0-9] - it will take only 0 to 9 digits </span></p> <p><span style="font-family:times new roman,serif"><br> <span class="postbody">{10} - means it takes exactly 10 digits.. </span></span></p> <p><span class="postbody" style="font-family:times new roman,serif">&nbsp;</span><span style="font-family:times new roman,serif"><span class="postbody"><strong>eg:9023123331</strong></span></span></p> <p><span class="postbody">&nbsp;</span></p> 2012-04-28T06:30:42-04:004956046http://forums.asp.net/p/1797930/4956046.aspx/1?Re+Regular+ExpressionRe: Regular Expression <p>use Expresso a free regular expression tool which can develop and test your regex...<a href="http://www.ultrapico.com/Expresso.htm">http://www.ultrapico.com/Expresso.htm</a>&nbsp;</p> <p>Thanks,</p> 2012-04-28T09:35:12-04:004956081http://forums.asp.net/p/1797930/4956081.aspx/1?Re+Regular+ExpressionRe: Regular Expression &lt;div&gt; <p>try this...</p> <p>&lt;asp:RegularExpressionValidator ID=&quot;RegularExpressionValidator2&quot; runat=&quot;server&quot; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ControlToValidate=&quot;txtManagerMobile&quot; ErrorMessage=&quot;Invalid Managar Mobile number!&quot; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Font-Bold=&quot;True&quot; ForeColor=&quot;Red&quot; <br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ValidationExpression=&quot;^(([0]{1})|([\&#43;][4]{2}))([1]|[2]|[3]|[7]){1}\d{8,9}&#36;&quot; Text=&quot;*&quot; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ValidationGroup=&quot;ValiadtionGRP&quot;&gt;&lt;/asp:RegularExpressionValidator&gt;</p> &lt;/div&gt; 2012-04-28T10:05:39-04:00