Help me regex in below string

Hi Team Need Regex for below string

String str=“This Resident Tenancy and Services Agreement (the “Agreement”) dated\r\n08/18/2024\r\nBETWEEN:\r\nAMICA UNIONVILLE\r\n(The “Owner”)\r\n- and -\r\nAuto MimiKH Farnklyn RJLYE\r\n(the “Resident”)\r\n- and -”

I need required First output as =AMICA UNIONVILLE
Second Output As =Auto MimiKH Farnklyn RJLYE

Regards
Sai

Hi @Mada_Sai_Krishna

Can you try the below

Replace = Input.Replace("\r\n","")
First = System.Text.RegularExpressions.Regex.Match(Replace,"(?<=BETWEEN:).*(?=\(The)").Value
Second = System.Text.RegularExpressions.Regex.Match(Replace,"(?<=and\s+\-.*)[A-Za-z].*(?=\()").Value

Output:

The image shows an output log from a software with highlighted text "AMICA UNIONVILLE" and "Auto MimiKH Farnklyn RJLYE" indicating some execution processes with specific completion times. (Captioned by AI)

Regards,