How to Extract text Ahead from Textfile

I need to extract text ahead of EMI(month): , Can anyone help me in this case.

Account Number: 978503257325

Bank: SAPTHAGIRI GRAMIN BANK

Branch: RAICHUR

Loan Taken On: 30-NOV-2007

Amount: 3400000

EMI(month): 23631

Hi,

How about the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"\w+(?=\s*EMI\(month\))").Value

Regards,

1 Like

Welcome to the UiPath community @Sriram_Gatla!

Yoichi mentioned the correct approach using Regex.

Alternatively, you may also consider using Split tim function if that’s easy for you to understand and use.

Just split the text by the desired keyword

strYourText.Split(“EMI(month) :”)(1)

1 Like

Hi
Welcome to UiPath forum

Use a assign activity like this
Let’s take you have your string input in a variable named Strinput

Stroutput = Split(Strinput.ToString.Trim,”EMI(month):”)(1).ToString.Trim

Cheers @Sriram_Gatla

1 Like

Thank You

Thank you

1 Like

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