I would build the string one character at a time with a loop. Upon encountering your escape character (/) have a subevent run to create the icon, skip the appropriate number of characters (the length of the /i[x] part) then continue. To position the icon correctly, you can get the len() of the string upon encountering the escape character and use that to figure out where your icon should be.
Here is an example I did for someone else for text effects, see if you can figure out how to modify it for your purposes. If you want to have the entire string shown at once, use a loop instead of every x seconds. Also the example used the text object, but you should definitely use spritefont for more control.
https://www.dropbox.com/s/211xd1ir76hq8 ... .capx?dl=0
Edit: fixed link