I have been experiencing a lot of difficulties with a very simple task in java. Firstly I would like to split a String to array, every letter alone and use a regex (this is important because i will upgrade it for more complex regex after this but I firstly need this simple one to run)
Stringbase = "artetbewrewcwewfd";
String arr2[] = base.split("\\.");
Why can't I do it like this?
String base = "artetbewrewcwewfd";
String arr2[] = base.split("\\[abcdefghijklmnopqrstuvwxyz]");
nor even like this.
thank you for your time
String arr2[] = "artetbew42rewcwewfd".split("(?!^)(?=.)");DOTALLmode matches any character.., you're looking for the character dot, which is\\.and something different.