#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?m)^.*(?:(?:201[89]|2\d[2-9]\d|[3-9]\d{3})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])|2017-(?:12-(?:0[1-9]|[12]\d|3[01])|11-(?:0[6-9]|[12]\d|3[01])))$"
Local $sString = "drwxrwxr-x - testetl hdp_test 0 2018-02-02 05:10 /raw/ADS/ClicksData/click/datetm=2017-10-15" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 09:35 /raw/ADS/ClicksData/click/datetm=2017-10-16" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-01-31 21:54 /raw/ADS/ClicksData/click/datetm=2017-10-17" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-01-31 23:59 /raw/ADS/ClicksData/click/datetm=2017-10-18" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-01-31 21:49 /raw/ADS/ClicksData/click/datetm=2017-10-19" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 09:32 /raw/ADS/ClicksData/click/datetm=2017-10-20" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-02 11:51 /raw/ADS/ClicksData/click/datetm=2017-10-21" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 09:08 /raw/ADS/ClicksData/click/datetm=2017-10-22" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-01-31 22:42 /raw/ADS/ClicksData/click/datetm=2017-10-23" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 09:58 /raw/ADS/ClicksData/click/datetm=2017-10-24" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-02 05:10 /raw/ADS/ClicksData/click/datetm=2017-10-25" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 09:46 /raw/ADS/ClicksData/click/datetm=2017-10-26" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 09:04 /raw/ADS/ClicksData/click/datetm=2017-10-27" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 09:46 /raw/ADS/ClicksData/click/datetm=2017-10-28" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-02 00:21 /raw/ADS/ClicksData/click/datetm=2017-10-29" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-02 05:09 /raw/ADS/ClicksData/click/datetm=2017-10-30" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-02 05:13 /raw/ADS/ClicksData/click/datetm=2017-10-31" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 14:34 /raw/ADS/ClicksData/click/datetm=2017-11-01" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-02 09:20 /raw/ADS/ClicksData/click/datetm=2017-11-02" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 14:35 /raw/ADS/ClicksData/click/datetm=2017-11-03" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 09:42 /raw/ADS/ClicksData/click/datetm=2017-11-04" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-02 09:18 /raw/ADS/ClicksData/click/datetm=2017-11-05" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 09:11 /raw/ADS/ClicksData/click/datetm=2017-11-06" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-01-31 17:56 /raw/ADS/ClicksData/click/datetm=2017-11-07" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-01-31 21:36 /raw/ADS/ClicksData/click/datetm=2017-11-08" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-01-31 16:43 /raw/ADS/ClicksData/click/datetm=2017-11-09" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-01-31 21:59 /raw/ADS/ClicksData/click/datetm=2017-11-10" & @CRLF & _
"drwxrwxr-x - testetl hdp_test 0 2018-02-01 09:23 /raw/ADS/ClicksData/click/datetm=2017-11-11" & @CRLF & _
"" & @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