2
Contributors
1
Reply
14
Views
3 Years
Discussion Span
Last Post by JamesCherrill
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);

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.