I am Analysing a string and I want to see how many times a certain substring (key word) appears, and print it each time it appears within the string, stating its appearance time.
ie. I'm looking for the substring an in the String:
how could I search this string to show an appears 5 times??