Metro Markets interview question

Find specific characters in the given string