public static String replaceAll(Matcher m, String replacement) { m.reset(); // Be sure to start with a fresh Matcher object StringBuffer result = new StringBuffer(); // We'll build the updated copy here while (m.find()) m.appendReplacement(result, replacement); m.appendTail(result); return result.toString(); // Convert result to a string and return } ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl