1.11M Members

how to append this javascript pattern to stringBuffer?

 
0
 

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

 
0
 

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 \
sb.append(pattern);

Question Answered as of 6 Months Ago by JamesCherrill
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: