#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?i)(?<![^\W_])n(?:r?[_.]|umero_?)\s*\K\d+"
Local $sString = "$t1 = "Disposizione n. 158 del 28.1.2012";" & @CRLF & _
"$t2 = "Disposizione n.66 del 15.1.2006";" & @CRLF & _
"$t3 = "Disposizione f_n_66 del 15.1.2001";" & @CRLF & _
"$t4 = "Disposizione numero 66 del 15.1.2018";" & @CRLF & _
"$t5 = "Disposizione nr. 66 del 15.1.2017";" & @CRLF & _
"$t6 = "Disposizione nr_66 del 15.1.2016";" & @CRLF & _
"$t7 = "Disposizione numero_66 del 15.1.2005";"
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