#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m):[^,]*,"
Local $sString = "open: boolean," & @CRLF & _
" onDidDismiss: () => void," & @CRLF & _
" message: string," & @CRLF & _
" showAddReceiptModal: boolean," & @CRLF & _
" showModal: (value: (((prevState: boolean) => boolean) | boolean)) => void," & @CRLF & _
" vehicleTabRef: React.MutableRefObject<null>," & @CRLF & _
" onReceiptSubmit: (data) => void," & @CRLF & _
" vehicle: any," & @CRLF & _
" showModal1: boolean," & @CRLF & _
" showModal2: (value: (((prevState: boolean) => boolean) | boolean)) => void," & @CRLF & _
" selectedReceipt: { __typename: "Receipt" | undefined; id: string | undefined; purchaseDate: string | undefined; sellerName: string | undefined; sellerAddress: string | undefined; sellerCity: string | undefined; sellerState: string | undefined; sellerZipCode: string | undefined; totalAmount: number | undefined; gallonsPurchased: number | undefined; image?: string | null | undefined | undefined; userID?: string | null | undefined | undefined; vehicleID: string | undefined; vehicle?: Vehicle | null | undefined | undefined; taxRefund?: number | null | undefined | undefined; createdAt: string | undefined; updatedAt: string | undefined }," & @CRLF & _
" onClick: () => void," & @CRLF & _
" onClick1: () => void," & @CRLF & _
" dataEditing: boolean," & @CRLF & _
" toastMessage: (val) => void," & @CRLF & _
" editing: (bool) => void," & @CRLF & _
" showToast: (bool) => void," & @CRLF & _
" showModal3: boolean," & @CRLF & _
" showModal4: (bool) => void," & @CRLF & _
" dateFilter: { startDate: string; endDate: string },"
Local $sSubst = ","
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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