1package com.zetcode;
2
3import java.util.Arrays;
4
5public class SplitStringTrimEx {
6
7 public static void main(String[] args) {
8
9 var input = " wood, falcon\t, sky, forest\n";
10
11 var output = input.trim().split("\\s*,\\s*");
12
13 Arrays.stream(output).forEach(System.out::println);
14 }
15}
16