src/it/finsiel/siged/util/HtmlParser.java
public static String substituteURL(String s) {
        String match;
        Matcher m = URL_PATTERN.matcher(s);
        StringBuffer sb = new StringBuffer();

        while (m.find()) {
            match = m.group();
            match = URL_REPAIR_PATTERN.matcher(match).replaceAll(
                    "<A HREF=\"$1\">$1</A>$2");
            m.appendReplacement(sb, match);
        }

        m.appendTail(sb);

        return sb.toString();
    }
/**
     * parse text and transform every url in a HTML-conform url
     * 
     * @param s
     *            input text
     * @return text with urls transformed to links (null on error)
     */
parse text and transform every url in a HTML-conform url

@param s
input text
@return text with urls transformed to links (null on error)
parse text and transform every url in a HTML - conform url @param s input text @return text with urls transformed to links ( null on error )
public static String substituteURL(String s) {
        String match;
        Matcher m = URL_PATTERN.matcher(s);
        StringBuffer sb = new StringBuffer();
        while (m.find()) {
            match = m.group();
            match = URL_REPAIR_PATTERN.matcher(match).replaceAll(
                    "<A HREF=\"$1\">$1</A>$2");
            m.appendReplacement(sb, match);
        }
        m.appendTail(sb);
        return sb.toString();
    }
public static String substituteURL ( String s ) { String match ; Matcher m = URL_PATTERN . matcher ( s ) ; StringBuffer sb = new StringBuffer ( ) ; while ( m . find ( ) ) { match = m . group ( ) ; match = URL_REPAIR_PATTERN . matcher ( match ) . replaceAll ( "<A HREF=\"$1\">$1</A>$2" ) ; m . appendReplacement ( sb , match ) ; } m . appendTail ( sb ) ; return sb . toString ( ) ; }
parse text and transform every url in a HTML-conform url
parse text and transform every url in a HTML - conform url