requirement: requirement is to replace an img tag in a string with an attribute of the img tag (name)
example:
aaaaaaaaaaaa
<img name="U+1F608" src="../../static/images/emoji/1f608.png" style="width: 18px;height: 18px;margin: 2px;">
bbbbbbbbbbbbb
<img name="U+1F609" src="../../static/images/emoji/1f609.png" style="width: 18px;height: 18px;margin: 2px;">
cccccccccccccc
you can see that this string is aaaaaaaaa Img tag bbbbbb Img tag cccccc,
result requires aaaaaa U+1F608 bbbbbbbbb U+1F609 cccccccccccccc
try: feels that regular matching is OK, but how to match and replace it with the name attribute is a bit difficult