+
+ public static String performRegularExpressionReplacement(String aSource,
+ String aSearchExpression, String aReplacement) throws Exception {
+
+ RE regularExpression;
+
+ regularExpression = new RE(aSearchExpression);
+
+ return regularExpression.substituteAll(aSource, aReplacement);
+ }
+
+ public static boolean performRegularExpressionSearch(String aSource,
+ String aSearchExpression) throws REException {
+ RE regularExpression;
+
+ regularExpression = new RE(aSearchExpression);
+
+ return regularExpression.isMatch(aSource);
+ }
+
+/*
+ return StringUtil.createHTML(
+ StringUtil.deleteForbiddenTags(aText),
+ MirGlobal.getConfigProperty("Producer.ImageRoot"),
+ MirGlobal.getConfigProperty("Producer.MailLinkName"),
+ MirGlobal.getConfigProperty("Producer.ExtLinkName"),
+ MirGlobal.getConfigProperty("Producer.IntLinkName")
+ );
+ public static String createHTML(String content){
+ content=convertNewline2Break(content);
+ content=convertNewline2P(content);
+ content=createMailLinks(content);
+ content=createURLLinks(content);
+ return content;
+
+ public static String convertNewline2Break(String haystack) {
+ return re_newline2br.substituteAll(haystack,"$0<br />");
+ }
+
+ public static String convertNewline2P(String haystack) {
+ return re_brbr2p.substituteAll(haystack,"\n</p><p>");
+ }
+
+ public static String createMailLinks(String haystack, String imageRoot, String mailImage) {
+ return re_mail.substituteAll(haystack,"<img src=\""+imageRoot+"/"+mailImage+"\" border=\"0\"/> <a href=\"mailto:$0\">$0</a>");
+ }
+
+ public static String createURLLinks(String haystack, String title, String imageRoot,String extImage) {
+ if (title == null) {
+ return re_url.substituteAll(haystack,"<img src=\""+imageRoot+"/"+extImage+"\" border=\"0\"/> <a href=\"$0\">$0</a>");
+ } else {
+ title = removeHTMLTags(title);
+ return re_url.substituteAll(haystack,"<img src=\""+imageRoot+"/"+extImage+"\" border=\"0\"/> <a href=\"$0\">"+title+"</a>");
+ }
+ }
+
+ }
+*/