What is Regular Expression? In Testing where use Regular Expression?
Note : This is the question asked by a visitor siva. I am posting this in proper forum.
What is Regular Expression? In Testing where use Regular Expression?
Note : This is the question asked by a visitor siva. I am posting this in proper forum.
Regular Expression is a general format of values in a field.
Let us suppose a software application needs the date input in the format “DD-Mon, YYYY” e.g. 16-Dec, 2006.
Then the Regular Expression to represent and automatically convert the user input in above shown format should be,
[0-9][0-9]-[A-Z][a-z][a-z], [0-9][0-9][0-9][0-9]
Lack of WILL POWER has caused more failure than
lack of INTELLIGENCE or ABILITY.
-sutnarcha-
Regular expressions are certain special text strings which can be used to describe a particular search pattern.
Example:
We can use the regular expression \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}\b to search for an email address or to check whether the mail address entered is in a proper format.