#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^[\s+-]?[^\s]+\s([^\s\n]+).*$"
Local $sString = " +883620946918182db5a277fc5e328fee3030ef79 src/dobot_cr_driver (8836209)" & @CRLF & _
"-8fc5c05835a246d7cb46952f748efec11fbf0075 src/onrobot_driver" & @CRLF & _
" b5704131f0e2964e4d051d5e6f6560917c2a1969 src/ros_camera" & @CRLF & _
" 1ffdd69181389b14b7d6342f0c5bad3b45c5e32f src/ur_meta (1.1.5-315-g1ffdd69)" & @CRLF & _
" ec2beb65afd6be5373d1e21a86dd42a07e25b447 src/ur_official_driver (v2.0.0-4-gec2beb6)" & @CRLF & _
" 883620946918182db5a277fc5e328fee3030ef79 src/dobot_cr_driver (8836209)" & @CRLF & _
" 8fc5c05835a246d7cb46952f748efec11fbf0075 src/onrobot_driver (8fc5c05)" & @CRLF & _
" b5704131f0e2964e4d051d5e6f6560917c2a1969 src/ros_camera (heads/develop)" & @CRLF & _
" 1ffdd69181389b14b7d6342f0c5bad3b45c5e32f src/ur_meta (1.1.5-315-g1ffdd69)" & @CRLF & _
" ec2beb65afd6be5373d1e21a86dd42a07e25b447 src/ur_official_driver (v2.0.0-4-gec2beb6)"
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