This is continuation of How to get the desired character from the variable sized strings? but includes additional scenarios from which, a person names are to be extracted
pot-1_Sam [Sam is the word to be extracted]
pot_444_Jack [Jack is the word to be extracted]
pot_US-1_Sam [Sam is the word to be extracted]
pot_RUS_444_Jack[Jack is the word to be extracted]
pot_UK_3_Nick_Samuel[Nick_Samuel is the word to be extracted]
pot_8_James_Baldwin[James_Baldwin is the word to be extracted]
pot_8_Jack_Furleng_Derik[Jack_Furleng_Derik is the word to be extracted]
Above are the Sample words from which the names person names are to be extracted. One thing to note is that The person name will always start after a "Number" and an "Underscore". How to achieve the above using Java?