i used this regex but i want result from Dispatch To Supplier which on 5 line in short i want only address from this document. so for that what will be the regex ?
thanks
cheers
@monikanimbalkar send the text file or paste the test here as the way you get it from the source.
Yesh sure
PDF_Output (1).txt (1.6 KB)
did that help?
below is your text
and the regex regex101: build, test, and debug regex
Hi,
Probably you should use shortest match of regex as the following.
System.Text.RegularExpressions.Regex.Match(strData,"(?<=Despatch To)[\s\S]+?(?=Supplier)").Value
or
System.Text.RegularExpressions.Regex.Match(strData,"(?<=Dispatch To)[\s\S]+?(?=Supplier)").Value
Regards,