so how can split this combination in android ?
Thanks in advance :)`
i'm trying like thatString lines[] = String.split("\\r?\\n", -1);
but how can split all data in one time
so how can split this combination in android ?
Thanks in advance :)`
i'm trying like thatString lines[] = String.split("\\r?\\n", -1);
but how can split all data in one time
You can use Pattern for regex split
String fields = "name[Employee Name], employeeno[Employee No], dob[Date of
Birth], joindate[Date of Joining]";
Pattern pattern = Pattern.compile("\\[.+\\]+?,?\\s*" );
String[] split = pattern.split(fields);
References: How to split this string using Java Regular Expressions