Start New Discussion within our Software Development Community

var pattern =/^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/;

You can append any String to a StringBuffer by using its append method, eg

StringBuffer sb = new StringBuffer("pattern is ");
String pattern = "/^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/"; // will need to escape the \ chars as \

This question has already been answered. Start a new discussion instead.