@@ -0,0 +1,2258 @@
+package parse;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.BufferedWriter;%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.FileOutputStream;%0Aimport java.io.FileReader;%0Aimport java.io.IOException;%0Aimport java.io.OutputStreamWriter;%0Aimport java.io.UnsupportedEncodingException;%0Aimport java.util.regex.Pattern;%0A%0Aimport org.apache.commons.lang3.StringUtils;%0A%0Apublic class ShiftUrl %7B%0A    private void parse() throws%0A            UnsupportedEncodingException,%0A            FileNotFoundException,%0A            IOException%0A    %7B%0A        try (%0A                BufferedReader in = new BufferedReader(new FileReader(%0A                        new File(_input_path)));%0A                BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(%0A                        new File(_output_path)), %22UTF-8%22))%0A                )%0A        %7B output(in, out); %7D finally %7B%7D%0A    %7D%0A%0A    private void output(BufferedReader in, BufferedWriter out) throws IOException %7B%0A        String line;%0A        while ((line = in.readLine()) != null) %7B%0A            if (StringUtils.isBlank(line)) continue;%0A            line = AT_COSME_URL_PATTERN.matcher(line).replaceFirst(%22$1$2%22);%0A            if (JPN_PATTERN.matcher(line).find()) continue;%0A            line = line.trim();%0A            String%5B%5D unCheck = line.split(%22%5Ct%22);%0A            if (unCheck.length != 2) continue;%0A            if (!unCheck%5B1%5D.matches(URL_REGEX)) continue;%0A            out.write(line);%0A            out.newLine();%0A        %7D%0A        out.flush();%0A    %7D%0A%0A    private static String _input_path = %22/tmp/input%22;%0A    private static String _output_path = %22tmp/output%22;%0A    private static final String URL_REGEX = %22http(s)?://%5Ba-zA-Z0-9-=_.?/%25#%5D+%22;%0A    private static final Pattern AT_COSME_URL_PATTERN = Pattern.compile(String.format(%22(%5Ct.*)(%25s).*$%22, URL_REGEX));%0A    private static final Pattern JPN_PATTERN = Pattern.compile(%22%5B%E3%81%81-%E3%82%93%E3%82%A1-%E3%83%B6%E4%B8%80-%E9%BE%A0%E3%80%85%E3%83%BC%5D%22);%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        new ShiftUrl(args).parse();%0A    %7D%0A%0A    private ShiftUrl(String%5B%5D args) %7B init(args); %7D%0A%0A    private static void init(String%5B%5D args) %7B%0A        if (args == null %7C%7C args.length == 0)%0A            return;%0A        _input_path = args%5B0%5D;%0A        _output_path = args%5B1%5D;%0A    %7D%0A%7D%0A

Create ShiftUrl.java