#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?i)w(?:e{2})?k\s*(\d+)(?: +(\d{4})\b)?(?:(?:\s*(?:until|tm)\s*|[ _\/])(?:w(?:e{2})?k)?(\d+)(?: +(\d{4})\b)?)?"
Local $sString = "wk 1 2016 // w eek 1 (2016)" & @CRLF & _
"(wk 47 2015 tm 9 2016) // w eek 47 (2015) - w eek 9 (2016) " & @CRLF & _
"Soccer International wk43" & @CRLF & _
"National Geopgraphic (wk50)" & @CRLF & _
"Schoolpaper wk39/wk43" & @CRLF & _
"Some magazine week12 until 16" & @CRLF & _
"Another magazine wk36_38" & @CRLF & _
"Another magazine wk36_wk38"
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