Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static List<String> getArray() throws IOException {
- return Files.readAllLines(Paths.get("TimeTable.csv"));
- }
- public static void main(String[] args) throws IOException {
- String p = "(?i)^\"(\\w+) (\\w+) (\\w+) (?:.+)?\",\"(\\d+)\\.(\\d+)\\.(\\d+)\",\"(\\d+):(\\d+):(\\d+)\"(?:.*?)$";
- String rep = "$6-$5-$4 ==> $7:$8 $1 $2 $3";
- List<String> res = getArray();
- for(int i = 1; i < res.size(); ++i) {
- System.out.println(res.get(i).replaceAll(p, rep));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement