#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)!\[readme-images\/([a-zA-Z0-9_.-\/]*)\].*$"
Local $sString = "screen123.css" & @CRLF & _
"screen-new-file.css" & @CRLF & _
"screen_new.js" & @CRLF & _
"screen new file.css" & @CRLF & _
"......." & @CRLF & _
"no funny $#!&@$" & @CRLF & _
"screen/sf" & @CRLF & _
"" & @CRLF & _
"Examples:" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Code Example:" & @CRLF & _
"https://github.com/apollosolutions/retail-supergraph/blob/main/subgraphs/products/schema.graphql" & @CRLF & _
"# 1. GraphQL API for each microservice"
Local $sSubst = "<img src="readme-images/$1" width="300"/>"
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