java.util.regex.Pattern.splitAsStream()のサンプル

Javaコード
package test;

import java.util.regex.Pattern;
import java.util.stream.Stream;

public class SplitAsstreamDemo {

public static void main(String[] args) {
Pattern pattern = Pattern.compile(“:");
Stream<String> cft = pattern.splitAsStream(“this/is*test:info");
cft.forEach(System.out::println);

}

}

結果
this/is*test
info

Java

Posted by arkgame