Basically what I want to do is this:
String mystr = "hello Benjamin Benny Benn hey hey";
String pattern = "Be";
Desired list = {"Benjamin","Benny","Benn"};
I know how to do this in a really simple way. What I am looking for is a fast way to do it based on regex or whatever that works for me. I want a list of all sub-strings(words) starting with a specific pattern.
I know how to do this in a really simple way.So please post your code to make your question more clear.