#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?ix) " & @CRLF & _
"(\w+)\ (semaine|jours)?" & @CRLF & _
"|" & @CRLF & _
"(demain|ce soir|aujourd'hui|" & @CRLF & _
"(next|this)[\ \b](matin|après-midi|soir|Lundi|Mardi|Mercredi|Jeudi|Vendredi|Samedi|Dimanche)" & @CRLF & _
")|(Lundi|Mardi|Mercredi|Jeudi|Vendredi|Samedi|Dimanche)" & @CRLF & _
"|" & @CRLF & _
"(janvier|février|Mars|Avril|Mai|Juin|Juillet|Août|Septembre|Octobre|Novembre|Décembre)\ (\w+)((\s|\-)?\w*)" & @CRLF & _
""
Local $sString = "quelle sera la température dans cinq jours" & @CRLF & _
"c'est quoi la température pour aujourd'hui" & @CRLF & _
"Comment fera-t-il lundi prochain?" & @CRLF & _
"quelle est la température ce soir?" & @CRLF & _
"donne-moi la température pour demain matin" & @CRLF & _
"quelle sera la température dans 8 semaines" & @CRLF & _
"température cet après-midi" & @CRLF & _
"température lundi prochain" & @CRLF & _
"What is the weather for march 8" & @CRLF & _
"What is the weather for march twenty-second"
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