* @throws DotRuntimeException
*/
public static String replaceAll(String original,String substitution,String regEx) throws DotRuntimeException{
String result = original;
RegEX i = getInstance();
Perl5Substitution sub = i.localP5Sub.get();
Perl5Matcher matcher = i.localP5Matcher.get();
sub.setSubstitution(substitution);
Pattern pattern;
try {
pattern = i.getPattern(regEx);
} catch (MalformedPatternException e) {
Logger.error(RegEX.class, "Unable to compile pattern for regex", e);