while ( matcher.find() ) {
String match = matcher.group( 1 );
InterpolationTerm expression = new InterpolationTerm( match, locale );
if ( expression.needsEvaluation() ) {
String resolvedExpression = expression.interpolate( context );
resolvedExpression = Matcher.quoteReplacement( resolvedExpression );
matcher.appendReplacement( sb, resolvedExpression );
}
}
matcher.appendTail( sb );