string.replaceAll(regex,replacement) does not work for some cases
===

The regular expression I am trying to use is 

     String re2="((?:(?:[1]{1}\\d{1}\\d{1}\\d{1})|(?:[2]{1}\\d{3}))[-:\\/.](?:[0]?[1-9]|[1][012])[-:\\/.](?:(?:[0-2]?\\d{1})|(?:[3][01]{1})))(?![\\d])";	// YYYYMMDD 1

But when I try to replace all occurrences,
    
    string.replaceAll(re2,getDate(dayForward,dateFormat));

 doesn't work. And,

    matcher.appendReplacement(stringBuffer, getDate(dayForward,dateFormat));

only replaces the first occurrence.

Is there any way I can replace all the occurrences?