Displaying page
of
pages;
Items to
Title |
Test
Details
To validate the File Type for a FileUploader
|
Expression |
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.pdf)$
|
Description |
You can use this to check the valid file type you have given to the last in the expression
like
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.pdf)$
This will accept .pdf only
OR
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+((.pdf)|(.doc))$
This will accept .pdf and .doc
OR
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+((.pdf)|(.doc)|(.txt))$
This will accept .pdf , .doc and .txt
|
Matches |
C:\Documents and Settings\chandan.kumar\Desktop\1004.pdf
|
Non-Matches |
C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg
|
Author |
Rating:
Chandan Kumar
|
Title |
Test
Details
DECIMAL CHECK (Max 2 digit after Decimal )
|
Expression |
^\d+(?:\.\d{0,2})?$
|
Description |
This will validatet the Number for Max Tow decimal place after a number.. it will validate like 12, 12.1, 12.23; but it will invalidate 12.326
|
Matches |
100,100.1,100.11
|
Non-Matches |
100.123 , 100.1234
|
Author |
Rating:
Chandan Kumar
|
Title |
Test
Details
Define Maximum length to a TextBox
|
Expression |
^(.|\r|\n){1,10}$
|
Description |
This expression can be use to define the maximum length to a textBox.
U can change the maximum character by replacing the last numeric value that is 10 in my example.
Just change this number to your desired number like
^(.|\r|\n){1,10}$ : for max 10 character
^(.|\r|\n){1,20}$ : for max 20 character
|
Matches |
ChandanKum
|
Non-Matches |
ChandanKuma
|
Author |
Rating:
Not yet rated.
Chandan Kumar
|
Title |
Test
Details
To Accept DECIMAL or FLOAT
|
Expression |
^([0-9]*|\d*\.\d{1}?\d*)$
|
Description |
This Expression will allow to accept the float or decimal values only. We always got stuck to allow only a decimal in the text area at any index along with numbers
|
Matches |
.123, 123.1, 1.0
|
Non-Matches |
1.1.1; 1.., 0.., .000.1
|
Author |
Rating:
Not yet rated.
Chandan Kumar
|
Title |
Test
Details
To allow certain file type while uploading a file using FileUpload
|
Expression |
\.(?i:)(?:jpg|gif)$
|
Description |
This expression will only allow the .jpg and .gif file to get uploaded.
This handles the case of the file type i.e. it will accept .gif and .GIF both and so on .JPG and .jpg.
|
Matches |
mypicture.jpg, MYPICTURE.JPG, MYPICTURE.GIF, mypicture.gif
|
Non-Matches |
mypicture.png, mypicture.bmp
|
Author |
Rating:
Not yet rated.
Chandan Kumar
|
Title |
Test
Details
To Accept Charcters only
|
Expression |
/[a-zA-Z]/
|
Description |
To accept only charactes only for both the cases i.e the Upper Case and the Lower Case
|
Matches |
chandan kumar
|
Non-Matches |
chandan9
|
Author |
Rating:
Not yet rated.
Chandan Kumar
|
Title |
Test
Details
To find a match pattern in a string
|
Expression |
([Cc][Hh][Aa][Nn][Dd][Aa][Nn].*?)
|
Description |
To find a match pattern in a string not matter where the position of the pattern in the string and even no matter what is the suffix and what will be the prefix.
|
Matches |
Chandan Kumar, Kumar Chandan, Kumar Chandan Singh
|
Non-Matches |
Chanda Kumar, Kumar Chand
|
Author |
Rating:
Not yet rated.
Chandan Kumar
|
Title |
Test
Details
To check a valid IP Address
|
Expression |
\b(?:\d{1,3}\.){3}\d{1,3}\b
|
Description |
To check a valid IP Address. It will check the valid IP address on the logic of three dots max three digits in each section
|
Matches |
192.168.10.210
|
Non-Matches |
192.168.10.256.21
|
Author |
Rating:
Chandan Kumar
|
Displaying page
of
pages;
Items to