public static String replaceAll(String source, String pattern, String replace)
{
RegularExpression re = new RegularExpression(pattern);
Match matcher = new Match();
if (re.matches(source, matcher))
{
StringBuffer sb = new StringBuffer(source);
replaceAll(matcher, sb, replace);
return new String(sb);