Start Regular expression for validating numbers in asp net

Regular expression for validating numbers in asp net

can anybody help me regarding regular expreesion for mobile number should allow only numbers and should contain 10digits. some are giving error when i entered bellow 10 if i enter 12 digits error is not giving.

Because regular expressions are powerful and complex enough to be the subject of entire books, I’m going to stick strictly to their use in validation.

A while back, we were performance profiling an application and noticed a big performance bottleneck while mapping objects using Auto Mapper.

Mapping is of course somewhat expensive, but the numbers we were seeing were way higher than expected: mapping was ridiculously slow!

Not a super big deal in itself, except that while mapping this validation was executed for a few thousand objects, resulting in around one second (sometimes more) to map these objects. Here’s the code that had the bottleneck:, supposed to be super fast?

And especially in this case, where we’re only validating the string consists of a set of allowed characters, and making sure the string length is between 1 and 254 characters in length?

You can use Regular Expression to validate a Textbox to enter number only.

Forms; namespace Windows Forms Application1 Public Class Form1 Private Sub Text Box1_Key Press(By Val sender As Object, By Val e As System.

But before we benchmark: let’s look at the solution candidates first.