How to get string after some character

Friends,
I have string a string like below, Want to get 14684, how to get it
"
Value

Supplier_Number

14684

Supplier_Name

Kerrhawe

Temperature Range

2-8

Notified FF Date (dd-mm-yyyy)

17-08-2023

Green light date (dd-mm-yyyy)

18-08-2023 "

Thanks in advance

@aslam_ali1

or

Thanks @Shiva_Nikhil for your quick reply ,
but the value is dynamic sometimes 3 or 4 or 5 characters
Also it will always come after Supplier_Number

@aslam_ali1

try with other method which i have given

(?<=Supplier_Number\n\n).* or (?<=Supplier_Number\n\n)\d+

i have assigned string to Str1 and used this expression. but not getting the value.
System.Text.RegularExpressions.Regex.Match(Str1,“(?<=Supplier_Number\n\n).*”).Value

can you recheck its working for me

other wise try with this once

inputstr1.Split({“Supplier_Number”},StringSplitOptions.RemoveEmptyEntries).Last.ToString.Trim.Split({“Supplier_Name”},StringSplitOptions.RemoveEmptyEntries)(0).Trim

Hi @aslam_ali1

Please find the below xaml

BlankProcess8.zip (146.1 KB)

Hope this helps!!

@aslam_ali1

Try any of these

Str.Split({"Supplier_Number","Supplier_Name"},StringSplitOptions.None)(1).Trim

Or

System.Text.RegularExpressions.Regex.Match(str,"(?<=Supplier_Number\n+)\d+").Value

Cheers

Thank you @Shiva_Nikhil for your help

1 Like

Thank you @lrtetala for your help

1 Like

Thank you @Anil_G for taking your time to reply.

1 Like

Str.Split({“Supplier_Number”,“Supplier_Name”},StringSplitOptions.None)(1).Trim

This one worked for me.
in my case the number of lines after “Supplier_Number” is not constant it will be changing so the above expression worked for me.

1 Like

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