String link = replaceAll( matches[ i ].toString(), "\"", "" ); link = replaceAll( link, "\n", "" );
String link = RegExp.replaceAll( matches[ i ].toString(), "\"", "" ); link = RegExp.replaceAll( link, "\n", "" );
    public void enterLinks( Text linkEntryText ) {        String input = linkEntryText.getText();        RE regex = null;        try {            regex =                new RE( "(ed2k://\\|file\\|[^\\|]+\\|(\\d+)\\|([\\dabcdef]+)\\|)"                        + "|(sig2dat:///?\\|File:[^\\|]+\\|Length:.+?\\|UUHash:\\=.+?\\=)"                        + "|(\\\"magnet:\\?xt=.+?\\\")" + "|(magnet:\\?xt=.+?\n)"                        + ( ( linkEntryText.getLineCount() == 1 ) ? "|(magnet:\\?xt=.+)" : "" )                        + ( ( linkEntryText.getLineCount() == 1 ) ? "|(http://.+?\\.torrent.+)" : "" )                        + "|(\"http://.+?\\.torrent\\?[^>]+\")" + "|(http://.+?\\.torrent)", RE.REG_ICASE );        }        catch ( REException e ) {            e.printStackTrace();        }        REMatch[] matches = regex.getAllMatches( input );        for ( int i = 0; i < matches.length; i++ ) {            String link = replaceAll( matches[ i ].toString(), "\"", "" );            link = replaceAll( link, "\n", "" );            Message dllLink = new EncodeMessage( Message.S_DLLINK, link );            dllLink.sendMessage( core );        }        statusLine.update( G2GuiResources.getString( "LE_LINKS_SENT" ) + " " + matches.length );        linkEntryText.setText( "" );    }