Here i am haveing the text file, in that i want to extract only particular text (in my case i want to extract “Dynazzy” Which is company name and it is dynamic too) As shown below.
Deetails.txt (643 Bytes)
Can any one help me to find the solution
Thanks in advance
Can you confirm this?
You need to extract the data dynamically from the second line right?
Regards
Sudharsan
yes sir, Dynazzy is one of the company name which is dynamic for each file.
@adarsh_kotagiri The text file file you posted is the invoice right?
If you created this text file with robot
Please send the text file with the preserved format
Regards
Sudharsan
ya sure , this is the pdf file where i converted to text
Invoice 1.pdf (28.8 KB)
Deetails.txt (643 Bytes)
This can be done as follows
Regular Expression used
companyName = System.Text.RegularExpressions.Regex.Match(rText, "(?<=BILL TO\r?\n\r?\n[\w\ ]+\r?\n)[\w\ ]+").ToString
Run it on other files, there may be a need to tailor the regular expression so that it can work in all cases
Please refer the attached xaml file
How to extract specific Text from notepad.xaml (4.6 KB)
Also, please refer this post
Hi @adarsh_kotagiri ,
You have many activities for data manipulation for textfile in the below package.
- use " FindLineIndex " actiivity . It will return the Line index.
- use Read Specific Line to read the specific line from the text file.
Regards
Balamurugan.S
Thank you sir…
Thank you soo much sir., It’s really working for each file
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.