How to get value using Regex in the statement

I have the above text in a text file, I need to extract the value which is after Total Rec. in this case it is 234 can anybody suggest a regex expression ?

@Ishan_Shelke
please share string by copy
@Ishan_Shelke
check

Hi @Ishan_Shelke

(?<=Total Rec\.)([\s\S]*)(?=Total Disc\.)

This regex could work for you.
Later just use a Trim(" :".ToCharArray) function to remove the blank spaces.
image

Thanks

1 Like

Hi @Ishan_Shelke

Try the following below expression:

[\d]+\.+[\d]+(?=[\s[A-Za-z])

Hope it helps!!
Regards,

Hey, This Regex may work for you
It takes any string/number which comes after Total Rec and before Total Disc

(?<=Total Rec.\s+)([\d.]+)(?=\s+Total Disc)

image

Hi @Ishan_Shelke

Please use below regex expression

Hoe it works !!

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