It looks you had the wrong input for the Regex Matches.
Attached workflow (had to simplify because I didnt have the PDF).
Extract_PDF_Test - Forum.xaml (17.4 KB)
It looks you had the wrong input for the Regex Matches.
Attached workflow (had to simplify because I didnt have the PDF).
Extract_PDF_Test - Forum.xaml (17.4 KB)
Hello
Happy to help.
1. Date Prepared
Comments: There are three results in the sample text. If you only want the first one, then you need to user the below in an Assign activity to only get the first result.
Date Prepared = INSERTVARIABLE(0).Groups(1).ToString
If the sample text above has three samples/scenarios in it and would normally one have one result then you can just use:
Date Prepared = INSERTVARIABLE(0).ToString
Review the Regex101 link
Regex solution: (?<=Date Prepared : )\d\d.\d\d.\d\d\d\d
2. Submitted
Same scenario as above. Three results from sample text.
Regex Solution: (?<=Submitted : )\d\d.\d\d.\d\d\d\d
Review the Regex101 Link
3. GPN - Name
Comments: If its always 11 digits long then this will be fine.
Regex Solution: (?<=GPN - Name I ).{11}
4. Rank:
Comments: Some more samples are need to improve the regex solution.
Regex solution: (?<=Approved By : I\r\nI Rank : )([\w\d/\—\s1-9]+)( I Rank : I\r\nI)
Regex 101 link
5. Business Unit
Comments: Unsure of structure.
Regex Solution: (?<=Business Unit : )([\w\d])+
Regex101 link
6. Management Unit
Comments: If its only digits then it will work.
Regex Solution: (?<=I Management Unit : )\d+
Regex101 link
Part 2
7. Sub Management Unit
Regex solution: (?<=I Sub Management Unit : )\d+
8. Expense Type
NEED MORE DETAIL.
POSSIBLE Regex Solution: (?<=IExpense Type)( I Date I Description I Location 1| Location 2 I I Type I Engagement I Activity |\r\n\d+ )([\w+ ]+)
Regex101 Link
9. Description
Comments: NEED MORE DETAIL or SAMPLES.
Possible Regex Solution: (?<=Billable - )(\d±\d±\d+ )([a-zA-Z1-9 -]+)(?=HLD CAN BC)
Regex101 Link
10. Total Expenses
Unsure of output text. Need expected result/s from sample.
11. Type
Unsure of output text. Need expected result/s from sample.
12. Enagagement
Unsure of output text. Need expected result/s from sample.
13. Activity
Unsure of output text. Need expected result/s from sample.
Thanks @Steven_McKeering
Now i am able to get all values. Again thank you so much…
No worries
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.