How to get the required string using Regex Expression

Hi All i need the required string from the below striis not constant how can i retrieve it.

Hey

give a try with

Regex.Match(strResult,"(?<=IFSC, UUT8\(\—\) )ICIC\d{7}").Value

Regards

@chandolusathi.kumar

Please try this

.{11}(?=COMMUNICATION ADDRESS)

System.Text.RegularExpressions.Regex.Match(yourstringvariable,".{11}(?=COMMUNICATION ADDRESS)").Value

Cheers

HI @chandolusathi.kumar

Checkout this expression

System.Text.RegularExpressions.Regex.Match(InputString,"\S+(?=COMMUNICATION ADDRESS)").ToString

Hi @Sudharsan_Ka kindly give the solution for Gmai Address the end of Gmail is not always constant so based on the EMAIL-ID as reference please give the solution for email address

checkout this @chandolusathi.kumar

System.Text.RegularExpressions.Regex.Match(InputString,"(?<=EMAIL-ID).*(?=\d)").ToString

Regards
Sudharsan

Hi @Sudharsan_Ka kindly check the below string for getting the user name which is before the A/

You can also try this @chandolusathi.kumar

System.Text.RegularExpressions.Regex.Match(InputString,"(?m)(?<=EMAIL-ID)(.*?)\.COM").ToString

Regards
Sudharsan

Checkout this @chandolusathi.kumar

System.Text.RegularExpressions.Regex.Match(InputString,"\D+(?=A\/C)").ToString.Replace("-","")

Regards
Sudharsan

1 Like

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