#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\b[A-Z][a-z]+\b\s+\b[A-Z][a-z]+\b"
Local $sString = "54. Mikhail Stepanovich ZUSKO" & @CRLF & _
"(Михаил Степанович ЗУСЬКО)" & @CRLF & _
"Function: Russian military leader – Lieutenant- General" & @CRLF & _
"Chief of staff of the “West” grouping" & @CRLF & _
"Former Commander of the 58th Combined Arms Army of the Southern Military District" & @CRLF & _
"DOB: 24.5.1972" & @CRLF & _
"POB: Vetly, Volyn region, former Ukrainian SSR (now Ukraine)" & @CRLF & _
"Nationality: Russian" & @CRLF & _
"Gender: male" & @CRLF & _
"Associated entities: Ministry of Defence of the Russian Federation" & @CRLF & _
"" & @CRLF & _
"55. Mikhail Yuryevich TEPLINSKIY" & @CRLF & _
"(Михаил Юрьевич ТЕПЛИНСКИЙ) " & @CRLF & _
"Function: Russian military leader – Colonel-General" & @CRLF & _
"Commander of Airborne Forces of the Armed Forces of the Russian Federation" & @CRLF & _
"DOB: 9.1.1969" & @CRLF & _
"POB: Mospino, Donetsk oblast, former Ukrainian SSR (now Ukraine)" & @CRLF & _
"Nationality: Russian" & @CRLF & _
"Gender: male" & @CRLF & _
"Associated entities: Ministry of Defence of the Russian Federation" & @CRLF & _
"" & @CRLF & _
"56. Nikolay Mikhailovich PARSHIN" & @CRLF & _
"(Николай Михайлович ПАРШИН) " & @CRLF & _
"Function: Russian military leader – Lieutenant- General" & @CRLF & _
"Head of the Main Rocket and Artillery Directorate of the Ministry of Defense of the Russian Federation" & @CRLF & _
"DOB: 20.12.1962" & @CRLF & _
"POB: The village of Mordovskoye- Kolomasovo, former Mordovian ASSR (now Russian Federation)" & @CRLF & _
"Nationality: Russian" & @CRLF & _
"Gender: male" & @CRLF & _
"Associated entities: Ministry of Defence of the Russian Federation" & @CRLF & _
"" & @CRLF & _
"57. Oleg Yurievich TSOKOV" & @CRLF & _
"(Олег Юрьевич ЦОКОВ) " & @CRLF & _
"Function: Russian military leader – Major-General" & @CRLF & _
"Commander of the 144th Motor Rifle Division of the 20th Combined Arms Army of the Armed Forces of the Russian Federation" & @CRLF & _
"DOB: 23.9.1971" & @CRLF & _
"POB: former USSR (now Russian Federation)" & @CRLF & _
"Nationality: Russian" & @CRLF & _
"Gender: male" & @CRLF & _
"Associated entities: Ministry of Defence of the Russian Federation" & @CRLF & _
"" & @CRLF & _
"58. Ramil Rakhmatulovich IBATULLIN" & @CRLF & _
"(Рамиль Рахматуллович ИБАТУЛЛИН)" & @CRLF & _
"Function: Russian military leader – Major-General" & @CRLF & _
"Commander of the 90th Guards Tank Division" & @CRLF & _
"DOB: 22.10.1976" & @CRLF & _
"POB: Bagishevo, Apastovsky District, Tatarstan, former USSR (now Russian Federation)" & @CRLF & _
"Nationality: Russian" & @CRLF & _
"Gender: male" & @CRLF & _
"Associated entities: Ministry of Defence of the Russian Federation" & @CRLF & _
"" & @CRLF & _
"59. Sergey Viktorovich KARAKAEV" & @CRLF & _
"(Сергей Викторович КАРАКАЕВ) " & @CRLF & _
"Function: Russian military leader – Colonel-General" & @CRLF & _
"Commander of the Strategic Missile Forces" & @CRLF & _
"DOB: 4.6.1961" & @CRLF & _
"POB: The village of Ivano-Slyusarevka, Krasnodar Territory, former USSR (now Russian Federation)" & @CRLF & _
"Nationality: Russian" & @CRLF & _
"Gender: male" & @CRLF & _
"Associated entities: Ministry of Defence of the Russian Federation" & @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