#include <Array.au3>
Local $Str = 'I like 123youcancity.jpg、city1.jpg、city365.jpg most. I suppose cityss.jpg and city_1.jpg a.jpgre the worst ones.'
;~MsgBox(0, '原字符串', $Str)
Local $aSR = StringRegExp($str, '(?i)\w*city(?:_?\d*)?\.jpg', 3)
_ArrayDisplay($aSR, UBound($aSR))