#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?s)\[\[Fichier:(?:\[\[.*?\]\]|[^]])*\]\]"
Local $sString = "=== Langues ===" & @CRLF & _
"{{Article détaillé|Langues en Afrique du Sud}}" & @CRLF & _
"[[Fichier:South Africa dominant language map.svg|thumb|300px| Répartition " & @CRLF & _
"des langues officielles dominantes par région :" & @CRLF & _
"{{clear}}" & @CRLF & _
"{{legend|#80b1d3|[[Zoulou]]}}" & @CRLF & _
"{{legend|#8dd3c7|[[Afrikaans]]}}" & @CRLF & _
"{{legend|#fb8072|[[Xhosa (langue)|Xhosa]]}}" & @CRLF & _
"{{legend|#ffffb3|[[Anglais]]}}" & @CRLF & _
"{{legend|#fccde5|[[Tswana|Setswana]]}}" & @CRLF & _
"{{legend|#bebada|[[Ndébélés|Ndebele]]}}" & @CRLF & _
"{{legend|#fdb462|[[Sotho du Nord]]}}" & @CRLF & _
"{{legend|#b3de69|[[Sotho du Sud]]}}" & @CRLF & _
"{{legend|#bc80bd|[[Swati]]}}" & @CRLF & _
"{{legend|#ccebc5|[[Venda (langue)|Tshivenda]]}}" & @CRLF & _
"{{legend|#ffed6f|[[Tsonga (langue)|Xitsonga]]}}" & @CRLF & _
"{{legend|#d0d0d0|Pas de langage dominant}}]]" & @CRLF & _
"Il n'y a pas de langue maternelle majoritairement dominante en Afrique du Sud. Depuis [[1994]], [[Langues en Afrique du Sud|onze langues officielles]] (anglais, afrikaans, zoulou, xhosa, zwazi, ndebele, sesotho, sepedi, setswana, xitsonga, tshivenda<ref>[http://www.lafriquedusud.com/ethnies.htm lafriquedusud.com]</ref>) sont reconnues par la [[Constitution de l'Afrique du Sud|Constitution sud-africaine]]<ref>{{Ouvrage|langue=fr|auteur1=François- Xavier Fauvelle-Aymar|titre=Histoire " & @CRLF & _
""
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