Answers for "split string on multiple delimiters java"

2

java split for multiple characters

String input = "Hi,X How-how are:any you?";
String[] parts = input.split("[\\W]");
Posted by: Guest on June-02-2020
0

java array split by multiple ways

public class split_demo {
 
       public static void main (String[] args)
 
    {
 
              String str_split="split method.It is cool - (Hello-World)";
 
        for (String str_complex : str_split.split("\\s|,|\\.|-")) {
 
            System.out.println(str_complex);
 
        }
 
    }
 
}
Posted by: Guest on February-26-2021

Code answers related to "split string on multiple delimiters java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language