#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?ms)^(.*?)$\s+?^(?=.*^\1$)" & @CRLF & _
""
Local $sString = "FCS-S-101 (One Slat Asymmetry)" & @CRLF & _
"FCS-S-101 (One Slat Asymmetry)" & @CRLF & _
"FCS-S-101 (One Slat Asymmetry)" & @CRLF & _
"FCS-S-103 (One Slat Skew)" & @CRLF & _
"FCS-S-103 (One Slat Skew)" & @CRLF & _
"FCS-S-103 (One Slat Skew)" & @CRLF & _
"FCS-S-68 (Uncommanded Flaps Movement)" & @CRLF & _
"FCS-S-68 (Uncommanded Flaps Movement)" & @CRLF & _
"FCS-S-68 (Uncommanded Flaps Movement)" & @CRLF & _
"FCS-S-68 (Uncommanded Flaps Movement)" & @CRLF & _
"FCS-S-68 (Uncommanded Flaps Movement)" & @CRLF & _
"FCS-S-70 (Flaps Jammed, Unannunciated)" & @CRLF & _
"FCS-S-70 (Flaps Jammed, Unannunciated)" & @CRLF & _
"FCS-S-70 (Flaps Jammed, Unannunciated)" & @CRLF & _
"FCS-S-70 (Flaps Jammed, Unannunciated)" & @CRLF & _
"FCS-S-70 (Flaps Jammed, Unannunciated)" & @CRLF & _
"FCS-S-75 (Erroneous Flaps Indication)" & @CRLF & _
"FCS-S-75 (Erroneous Flaps Indication)" & @CRLF & _
"FCS-S-79 (Flaps Asymmetry)" & @CRLF & _
"FCS-S-79 (Flaps Asymmetry)" & @CRLF & _
"FCS-S-82 / FCS-S-87 (Outboard / Inboard Flap Asymmetry)" & @CRLF & _
"FCS-S-82 / FCS-S-87 (Outboard / Inboard Flap Asymmetry)" & @CRLF & _
"FCS-S-84 / FCS-S-86 (Inboard / Outboard flap Skew)" & @CRLF & _
"FCS-S-89 (Uncommanded Slats Movement)" & @CRLF & _
"FCS-S-89 (Uncommanded Slats Movement)" & @CRLF & _
"FCS-S-89 (Uncommanded Slats Movement)" & @CRLF & _
"FCS-S-89 (Uncommanded Slats Movement)" & @CRLF & _
"FCS-S-89 (Uncommanded Slats Movement)" & @CRLF & _
"FCS-S-89 (Uncommanded Slats Movement)" & @CRLF & _
"FCS-S-89 (Uncommanded Slats Movement)" & @CRLF & _
"FCS-S-89 (Uncommanded Slats Movement)" & @CRLF & _
"FCS-S-89 (Uncommanded Slats Movement)" & @CRLF & _
"FCS-S-91 (Slats Jammed, Unannunciated)" & @CRLF & _
"FCS-S-91 (Slats Jammed, Unannunciated)" & @CRLF & _
"FCS-S-91 (Slats Jammed, Unannunciated)" & @CRLF & _
"FCS-S-91 (Slats Jammed, Unannunciated)" & @CRLF & _
"FCS-S-95 (Erroneous Slats Indication)" & @CRLF & _
"FCS-S-95 (Erroneous Slats Indication)" & @CRLF & _
"FCS-S-95 (Erroneous Slats Indication)" & @CRLF & _
"FCS-S-95 (Erroneous Slats Indication)" & @CRLF & _
"FCS-S-99 (Slats Asymmetry)" & @CRLF & _
"FCS-S-99 (Slats Asymmetry)" & @CRLF & _
"FCS-S-99 (Slats Asymmetry)" & @CRLF & _
"FCS-S-99 (Slats Asymmetry)"
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