'Match Dates'에 해당되는 글 1건

  1. 2010.02.19 Match Dates
01.JAVA/Java2010. 2. 19. 17:58
반응형
public class Main {
  public static void main(String[] argv) throws Exception {

    boolean retval = false;
    String date = "12/12/1212";
    String datePattern = "\\d{1,2}-\\d{1,2}-\\d{4}";
    retval = date.matches(datePattern);

  }
}
Posted by 1010