This should do it:
text.replaceAll("<record>.*?</record>", "{blank}");
Adding the ?
makes the match "non greedy" so it matches the fewest number of elements instead of the most.
Also note that handling these types of replacements are best left to an XML parser, unless they are simple replacements.