KeertiJ
(Keerti)
May 14, 2019, 9:40am
1
Hello,
I want to extract text from pdf. I have converted it into a text file. But the field that i want to extract lies between non static parameters.
for example
Invoice1:ORIGINAL INVOICE Invoice Number Reference Number Invoice Date Customer PO#
1253864 02585 2/12/1999 5465365
Invoice2:ORIGINAL INVOICE Invoice Number Reference Number Invoice Date
1236484 02665 7/8/1999 5568912
I want to extract Invoice date from both the invoices. Is there any general solution?
indra
(Indra)
May 14, 2019, 9:43am
2
@KeertiJ Use Regex or split by space than you can get invoice date. Refer for Regex
RobertD
(Docan Robert)
May 14, 2019, 9:44am
3
Only date will have the structure xx/xx/xxxx ? if yes then you can use \d+/\d+/\d+ to get dates in that format.
KeertiJ
(Keerti)
May 14, 2019, 10:25am
4
Thank you,Can you tell me in which activity do you use this?
indra
(Indra)
May 14, 2019, 10:28am
5
@KeertiJ Can you attach sample text files
KeertiJ
(Keerti)
May 14, 2019, 10:29am
6
@RobertD no the date format changes.
And the customer po# also has to be extracted.
KeertiJ
(Keerti)
May 14, 2019, 10:44am
7
@indra Sorry,I can’t share it, as it is confidential .I’ll send similar one
New folder.zip (1.1 KB)
Can you please tell me how do i extract $93.5 and $150.5 from the attached files?
indra
(Indra)
May 14, 2019, 10:46am
8
@KeertiJ Can you please tell what are the values you needs to extract from the text files?
KeertiJ
(Keerti)
May 14, 2019, 10:48am
9
@indra The amount which i have mentioned. $93.5 and $150.5 from both the files.
varunk
(Varun Kumar)
May 14, 2019, 11:13am
10
Hi @KeertiJ ,
Please find the below pattern to map the date as your requirement
\d/\d/\d+
indra
(Indra)
May 14, 2019, 11:25am
11
@KeertiJ Please check the zip file RegexFromTextFile.zip (12.2 KB)
1 Like
KeertiJ
(Keerti)
May 16, 2019, 7:55am
12
@indra Thank you so much. It worked.
1 Like
system
(system)
Closed
May 23, 2019, 6:37am
13
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.