I want to find all indexes for each occurrence of single alphabetical characters in a string. I don't want to catch single char html codes.
Here is my code:
import re
s = "fish oil B stack peanut c <b>"
words = re.finditer('\S+', s)
has_alpha = re.compile(??????).search
for word in words:
if has_alpha(word.group()):
print (word.start())
Desired output:
9
24