Regular expression for validating date of birth
Basically HTML5 can be used to develop 3D applications.
In this example, the date fields will only accept input that matches the pattern 'dd/mm/yyyy' (this could just as easily be changed to 'yyyy-mm-dd' or 'mm/dd/yyyy').Rather regular expressions work character by character. [1-9]› to match 3 followed by 0 or 1, or to match 1 or 2 followed by any digit, or to match an optional 0 followed by 1 to 9. [0-9]$"; Pattern pattern = Pattern.compile(regex); for(String date : dates) Output: 1/1/11 : true 01/01/11 : true 01/01/2011 : true 01/1/2011 : true 1/11/2011 : true 1/11/11 : true 11/1/11 : true List dates = new Array List(); //With leading zeros dates.add("01/01/11"); dates.add("01/01/2011"); //Missing leading zeros dates.add("1/1/11"); dates.add("01/1/2011"); dates.add("1/11/2011"); dates.add("1/11/11"); dates.add("11/1/11"); String regex = "^[0-3][0-9]/[0-3][0-9]/(? Because of this, you have to choose how simple or how accurate you want your regular expression to be. This is the simplest way to validate a dd/MM/yyyy date format string. Net Question Answer site, specially started to allow visitors of this site ask their doubts and queries. Just click the Ask Now button and ask your question now.
And it does work brilliantly except the fact that it cannot validate for months which have less than 31 days for example 30/02/2014 will be considered as a valid date. Now you can ask questions directly to me on my new site ASPForums.
Regular expression is a mathematics tools that is used to set a validation.