How to get the second word from a String?
- by Pentium10
Take these examples
Smith John
Smith-Crane John
Smith-Crane John-Henry
Smith-Crane John Henry
I would like to get the John
The first word after the space, but it might not be until the end, it can be until a non alpha character. How would this be in Java 1.5?