#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?<=KilometreSI I\\r\\n\*).[0-9\s]+"
Local $sString = "El\r\n_I ERNST&YOUNC Expense Report\r\nI Date Prepared: 01-08-2019 I Managing Country: XE I\r\nI Submitted: 01-08-2019 (In Audit) | Business Unit: XE045 I\r\n| GPN - Name: XE021000618 — Paul Prashanth | Management Unit: 00801 Sub Management Unit: 0907302 |\r\nI Signature: I Approved By: Rank: I\r\nI Rank: Administrative Contractor I Approval Signature: I\r\nI Expense Details (Attach supporting receipts) I Total Net IC = Chargeable P = Authorized I\r\nI Loc I Expense Type I Date I Description I Expense Expense I Type I Engagement I Activity I\r\nOTHER International Travel-Non-Billable - Ground 01-08-2019 Need clarification for claiming the taxi expenses P 33800872 0000\r\nTransportation - Mass/Public Transportation from same vendor for INR 2400 & No receipts fo\r\nTelephone for GBP l (INR 97.89) & Taxi for GB\r\n25 (INR 2470.75) Barcode : 2170270878\r\nI IIIIII IIIII IIIII IIIII IIIII IIIII IIIII IIIII IIIII IIIII IIII IIII Tom’s I 0.00 I 0.00 I Tom] KilometreSI I\r\n* 2 1 7 1 9 5 9 5 2 8 it Report Date Format: dd-mm-yyyy\r\nPage 1 of 1 10-06-2020"
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