#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(<img.+?="Inv.+?\/)(.+?)(\.)(.+?)(class=")(.+?)(.+?)(.+?\n)"
Local $sString = "<img src="InviousAnim_assets/FLM_Image_1.png" height="179px" width="102px" class="wlby_2"></img>" & @CRLF & _
"<img src="InviousAnim_assets/FLM_Image_2.png" height="55px" width="144px" class="wlby_2"></img>" & @CRLF & _
"<img src="InviousAnim_assets/FLM_Image_3.png" height="76px" width="76px" class="wlby_2"></img>" & @CRLF & _
"<img src="InviousAnim_assets/FLM_Image_4.png" height="142px" width="123px" class="wlby_2"></img>" & @CRLF & _
"<img src="InviousAnim_assets/FLM_Image_5.png" height="109px" width="109px" class="wlby_2"></img>" & @CRLF & _
"<img src="InviousAnim_assets/FLM_Image_6.png" height="73px" width="70px" class="wlby_2"></img>" & @CRLF & _
"<img src="InviousAnim_assets/FLM_Image_7.png" height="98px" width="97px" class="wlby_2"></img>" & @CRLF & _
"<img src="InviousAnim_assets/FLM_Image_8.png" height="109px" width="109px" class="wlby_2"></img>" & @CRLF & _
"<img src="InviousAnim_assets/FLM_Image_9.png" height="73px" width="70px" class="wlby_2"></img>"
Local $sSubst = "\1\2\3\4\id="\2"/>\n"
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm