How to break such a string "Ivanov I. teacher" into two substrings using split :
- Ivanov I.I.
- teacher
If there is definitely no space between the initials, then it is possible by a dot and a space. True point after the last initial disappears, but you can manually add:
String[] arr = "Иванов И.И. преподаватель".split(". "); arr[0]+="."; Source: https://ru.stackoverflow.com/questions/522126/
All Articles