package ru.spbau.twiktor;

public class TwitterRTFilter {
    private String textTwitter;

    public TwitterRTFilter(String newText) {
        if (newText == null || newText.isEmpty())
        {
            throw new NullPointerException("newText");
        }

        textTwitter = newText;
    }

    public String filter()
    {
        if (textTwitter.startsWith("RT"))
        {
            textTwitter = textTwitter.replaceAll("^RT ?@[A-Za-z0-9]+:?", "");
            textTwitter = textTwitter.substring(1);
        }

        return textTwitter;
    }

    public static void main(String[] args) {
        String text = "RT @zizudyfyzesi: Путин высказался напротив попыток переписать историю";

        TwitterRTFilter twitterRTFilter = new TwitterRTFilter(text);

        System.out.print(twitterRTFilter.filter());
    }
}

@@ -556,278 +556,7 @@
    %7D
-%0A%0A    public static void main(String%5B%5D args) %7B%0A        String text = %22RT @zizudyfyzesi: %D0%9F%D1%83%D1%82%D0%B8%D0%BD %D0%B2%D1%8B%D1%81%D0%BA%D0%B0%D0%B7%D0%B0%D0%BB%D1%81%D1%8F %D0%BD%D0%B0%D0%BF%D1%80%D0%BE%D1%82%D0%B8%D0%B2 %D0%BF%D0%BE%D0%BF%D1%8B%D1%82%D0%BE%D0%BA %D0%BF%D0%B5%D1%80%D0%B5%D0%BF%D0%B8%D1%81%D0%B0%D1%82%D1%8C %D0%B8%D1%81%D1%82%D0%BE%D1%80%D0%B8%D1%8E%22;%0A%0A        TwitterRTFilter twitterRTFilter = new TwitterRTFilter(text);%0A%0A        System.out.print(twitterRTFilter.filter());%0A    %7D
 %0A%7D%0A

Remove main method from TwitterRTFilter