As given below, My string consists of Where the third line is “Address 1” which is static, and the 2nd line is an empty blank line, and the first-line consists of a name.
Gautam Tarun
Address 1
I need the name above the “Address 1”, What will be the Regex Expression for it??
The scenario is where, The example string i mentioned above is a part of a big string, That name is not the first line of that whole string, I need to map that Name using the static “Address 1” Keyword.
Hi @Rakesh_Sampath
If you want to differentiate Name with address then You can do this way…
1st extract the whole pdf text which provides you with both name and address. then
if you want Name alone you can split the both parts by using this code:
YourString.Split(Environment.NewLine.ToArray,StringSplitOptions.RemoveEmptyEntries)
it gives you 2 strings one with Name and other with Address you can use any based on your requirement. Let me know if it is helpful
I tried this already, But the Expected output was inconsistent, So only i liked to ask you guys, to find out whether any other best way available to grab it !!