#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)^(generate|create|draw|make) (me|an?|the|this|that)? .* (of|for|about|showing|depicting|illustrating)"
Local $sString = "Generate an epic image of a dragon in flight" & @CRLF & _
"Create a realistic render of a futuristic city" & @CRLF & _
"Generate the perfect logo for a tech startup" & @CRLF & _
"Create this concept art for a fantasy novel" & @CRLF & _
"Generate that illustration about ancient myths" & @CRLF & _
"Create an animation showing a volcano eruption" & @CRLF & _
"Generate a portrait depicting a medieval knight" & @CRLF & _
"Draw me a dragon of fire" & @CRLF & _
"" & @CRLF & _
"Type your prompt below!" & @CRLF & _
"As long as the first parts of it are highlighted in multiple colors, like the examples above, the script will reconigize your prompt and generate and image." & @CRLF & _
"" & @CRLF & _
"Type here..."
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
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