I basically want the same functionality of preg_match_all()
from PHP in a Python way.
If I have a regex pattern and a string, is there a way to search the string and get back a dictionary of each occurrence of a vowel, along with its position in the string?
Example:
s = "supercalifragilisticexpialidocious"
Would return:
{
'u' : 1,
'e' : 3,
'a' : 6,
'i' : 8,
'a' : 11,
'i' : 13,
'i' : 15
}
etc...