I need to identify substrings found in a string such as:
"CityABCProcess Test" or "cityABCProcess Test"
to yield : [ "City/city", "ABC", "Process", "Test" ]
- The first string in the substring can be lowercase or uppercase
- Any substring with recurring uppercase letters will be a substring until a lowercase letter or space is found "ABCProcess -> ABC, ABC Process -> ABC"
- If there is an uppercase letter followed by a lowercase letter the substring will be everything until the next uppercase letter.
Can this be handled by regex? Or should I convert my strings to a character array and manually check these cases using some indexing logic. Would a lambda solution work here? What is the best way to go about this?