Extracting data using regex

Hi this is very urgent. Could anyone pls help me out. I want the extract the account name before “(abcd)” occurs first time in string. i.e I want to extract the text “Advantage Silver account” using regex.

Open Sole Current account (xyz free) 7 September 1999Converted to Student account (xyz free) 1 July 2002Converted to Student account (fee free) 8 August 2002Converted to Advantage Silver account (abcd) 4 November 2009Migrated to Select Gold account (abcd) 24 July 2015

1 Like

Hi,

You can use this Regex “(?<=to)[A-Za-z ]+(?=[(]abcd[)])” which will select all the accounts before (abcd) and you can use for each and loop through and after retrieving first one you can break the loop.

3 Likes

Thank you very much… it worked:)

1 Like

@Amrita, if the above solution helped, mark it as solution

2 Likes

Thanks a lot it worked

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.