#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?x)[a-f\d\-]+ # Matches a-f, any digit, - (hyphen)" & @CRLF & _
" # ^ One or more times (+)" & @CRLF & _
"\/ # Matches a /" & @CRLF & _
".+ # Matches any character one or more times" & @CRLF & _
"\. # Matches a . (dot)" & @CRLF & _
"(?i) # States that anything after this is case-insesitive" & @CRLF & _
" # ^ Inline Flag" & @CRLF & _
"(jpg|jpeg|gif|png) # Selects file extension" & @CRLF & _
" # ^ (either jpg, jpeg, gif, or png)" & @CRLF & _
"(?-i) # Removes Inline Flag"
Local $sString = ""/stories/main_imagescache/20160319-1549-2202-5826/blueapronimage.jpg"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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