#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)Booking Voucher Number: (?<number>\d\d\d\d\d\d\d\d\d\d)|(Guest Name : (?<name>\w\w.*))|(Check In Date : (?<date>\d{4}-\d{2}-\d{2}))|(Check Out Date : (?<Outdate>\d{4}-\d{2}-\d{2}))|(Number of Rooms : (?<RoomNumbers>)\d.*)|(Special Request : (?<SRQST>\w.*))|(paid for Guests: (?<PfG>)\d.*)|(Room Type : (?<RoomType>)\w.*)"
Local $sString = "Booking Voucher Number: 2052892268 " & @CRLF & _
"Guest Name : Maxie Dibbert " & @CRLF & _
"Check In Date : 2018-11-09 " & @CRLF & _
"Check Out Date : 2018-11-10 " & @CRLF & _
"Number of Rooms : 14 " & @CRLF & _
"Booking Type : Pay At Hotel Amount To Be Collected : 91.2 (SOD) " & @CRLF & _
"Special Request : NA " & @CRLF & _
"Breakfast Included: No Breakfast " & @CRLF & _
"paid for Guests: 0 " & @CRLF & _
"Room Type : Single Bed in Female Dormitory " & @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