#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "::(\w+)[^::]+::(?<content>.*?)::(?=\/\1)"
Local $sString = "::cck_gx::gx::/cck_gx::" & @CRLF & _
"::i1|0|gx::Lorem::/i1|0|gx::" & @CRLF & _
"::head1|0|gx::ipsum::/head1|0|gx::" & @CRLF & _
"::tx1|0|gx::dolor, fithos lusec.::/tx1|0|gx::" & @CRLF & _
"::cckend_gx::::/cckend_gx::" & @CRLF & _
"::cck_gx::gx::/cck_gx::" & @CRLF & _
"::i1|1|gx::calendar::/i1|1|gx::" & @CRLF & _
"::head1|1|gx::1 Fatura Grátis Por Ano::/head1|1|gx::" & @CRLF & _
"::tx1|1|gx::10% de cada mensalidade é reservado, e o valor acumulado até a renovação do Seguro Porto Seguro ou Azul Seguros, é devolvido em forma de desconto. Ou seja, Cliente Conecta pode ter uma fatura de celular grátis por ano.::/tx1|1|gx::"
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