date « validation « Java Regex Q&A

Home
Java Regex Q&A
1.Development
2.find
3.group
4.Match
5.matcher
6.number
7.Operation
8.parse
9.Pattern
10.replace
11.validation
12.word
Java Regex Q&A » validation » date 

1. Regex DATE format validation on Java    stackoverflow.com

I'm just wondering if there is a way (maybe with REGEX) to validate that an input on a java desktop app is exactly an string formated as: "YYYY-MM-DD". I've search but with ...

2. regex date validation for yyyyMMdd    stackoverflow.com

I'm looking for a regex string that will validate dates formatted as yyyyMMdd (no delimiters) and works for leap years. The closest thing I found so far only validates dates ...

3. Validating date using regex and simple date format    coderanch.com

Hi, How can I check if date for Feb month is valid? I tried the below program but for input 02/31/2100, I get the valid result. public static void main(String[] args) { SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); String inputStr = "02 /31/ 2100"; inputStr = inputStr.replaceAll("\\s", ""); String exp = "^(0?[1-9]|1[012])[-/]?(0?[1-9]|[12][0-9]|3[01])[-/]?(19[\\d]{2}|20[\\d]{2}|2100)$"; Pattern pattern = Pattern.compile(exp,Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); if(matcher.matches()) { ...

4. Reading in a date and validating it with proper calendar regex    forums.oracle.com

Hello everyone: I have almost finished my java school assignment and am now going for the bonus task which is to (when I read in a date from the user) I must validate it not only in the correct format (DD-MM-YYY with the dashes inbetween) but I have to validate it according to a proper calendar including leap years and some ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.