}
}
- public static String performCaseInsensitiveRegularExpressionReplacement(String aSource, String aSearchExpression, String aReplacement) {
- try {
- RE regularExpression;
-
- regularExpression = new RE(aSearchExpression, RE.REG_ICASE);
-
- return regularExpression.substituteAll(aSource, aReplacement);
- }
- catch (Throwable t) {
- throw new UtilFailure("StringRoutines.performRegularExpressionReplacement: " + t.toString(), t);
- }
- }
-
- public static boolean performRegularExpressionSearch(String aSource, String aSearchExpression) {
- try {
- RE regularExpression;
-
- regularExpression = new RE(aSearchExpression);
-
- return regularExpression.isMatch(aSource);
- }
- catch (Throwable t) {
- throw new UtilFailure("StringRoutines.performRegularExpressionSearch: " + t.toString(), t);
- }
- }
-
/**
* Separates a string based on a separator:
* <code>seperateString("a:b:c", ":");</code> will lead to