Splitting text extracted from pdf.co

I am building a scenario starting with a webhook, parsing a document from pdf.co and creating a record in Airtable.
My goal is in the pdf I am extracting the information from, there is a paragraph of text I am extracting which looks something like this
‘Name
John Smith
Date of Birth
01/01/2001
Address
Threadneedle St
London
EC2R 8AH’

And I have created in Airtable separate fields for the name, address and date of birth and what I’m extracting I want to be able to separate them into their respective fields and remove the headings. So something like ‘extract after name to address’?

If you can’t tell, I’m incredible new to this and this is my first project here!

1 Like

I would just throw an AI step after the PDF extraction. Have AI read the content, tell it what fields you want, and have it return JSON as the output. That should give you all the ordered pairs you need. Then, just map the JSON responses into Airtable.

Hope that helps.

Jeff

It says about need credits - is there a way of me doing this for free?

You can do it for free using Regex in a data parsing step, but that is pretty involved.
AI is extremely cheap. They just need you to have some money on hand for the parsing. I’m guessing AI could parse 100 emails for about $0.01.
Jeff

Hey Arianna,

can you copy sample output from the pdf.co module here so we can test with it? Also, will the PDFs be structured the same way every time?

Hiya,

Is this it?

https://pdf-temp-files.s3.us-west-2.amazonaws.com/JJ4UPSGJNOXBH8Y22GUV4FICGIO280QX/output.json?X-Amz-Expires=3600&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZJDPLX6D7EHVCKA/20250613/us-west-2/s3/aws4_request&X-Amz-Date=20250613T104148Z&X-Amz-SignedHeaders=host&X-Amz-Signature=96162a305f361f34826672cb76708992754a9a1346469cffef54fded61628a21

The pdfs will have the same structure, but depending on company information (2 directors instead of 1), things may appear in different places on the page. But the structure of the text I am trying to extract should always appear the same, especially with the blocks of text I am looking to separate (the director block).

Let me know if you need anymore information?

No, I mean the output of the module in JSON format. Its on the top right:

Ahh okay, my bad.

[
{
“status”: “success”,
“message”: “Success”,
“pageCount”: 11,
“url”: “https://pdf-temp-files.s3.us-west-2.amazonaws.com/JJ4UPSGJNOXBH8Y22GUV4FICGIO280QX/output.json?X-Amz-Expires=3600&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZJDPLX6D7EHVCKA/20250613/us-west-2/s3/aws4_request&X-Amz-Date=20250613T104148Z&X-Amz-SignedHeaders=host&X-Amz-Signature=96162a305f361f34826672cb76708992754a9a1346469cffef54fded61628a21”,
“outputLinkValidTill”: “2025-06-13T11:41:30.4434661+00:00”,
“body”: {
“objects”: [
{
“name”: “company_name”,
“objectType”: “field”,
“value”: “CREDITSERVE BUSINESS INFORMATION LIMITED”,
“pageIndex”: 0,
“rectangle”: [
23.6339874,
141.261734,
489.634583,
24.6565952
]
},
{
“name”: “reg_number”,
“objectType”: “field”,
“value”: “06534336”,
“pageIndex”: 0,
“rectangle”: [
25.1753349,
174.1372,
88.884346,
23.6292362
]
},
{
“name”: “incorporation_date”,
“objectType”: “field”,
“value”: “13/03/2008”,
“pageIndex”: 0,
“rectangle”: [
25.1753349,
205.471619,
121.766418,
22.60188
]
},
{
“name”: “registered_office”,
“objectType”: “field”,
“value”: “LYRIC HOUSE 6B ST ANDREW STREET , HERTFORD , HERTFORDSHIRE , SG14 1JA”,
“pageIndex”: 0,
“rectangle”: [
26.7166824,
236.806046,
343.7204,
24.1429157
]
},
{
“name”: “issued_capital”,
“objectType”: “field”,
“value”: “100”,
“pageIndex”: 0,
“rectangle”: [
24.14777,
269.167816,
186.502991,
24.1429157
]
},
{
“name”: “last_annual_return”,
“objectType”: “field”,
“value”: “13/03/2025”,
“pageIndex”: 0,
“rectangle”: [
26.7166824,
427.380981,
101.728905,
27.7386684
]
},
{
“name”: “ccj_check”,
“objectType”: “field”,
“value”: “No Judgments currently registered”,
“pageIndex”: 4,
“rectangle”: [
0,
0,
0,
0
]
},
{
“objectType”: “table”,
“name”: “ccj_table”,
“rows”: [
{
“column1”: “From”,
“column2”: “To”,
“column3”: “No. Outstanding”,
“column4”: “Amount”,
“column5”: “No. of Writs”
},
{
“column1”: “29/05/2022”,
“column2”: “29/05/2025”,
“column3”: “0”,
“column4”: “£0.00”,
“column5”: “0”
}
]
},
{
“name”: “legal_notices”,
“objectType”: “field”,
“value”: “”
},
{
“name”: “total_mortgages”,
“objectType”: “field”,
“value”: “1”,
“pageIndex”: 5,
“rectangle”: [
25.1753349,
71.91507,
96.0773,
24.1429157
]
},
{
“name”: “mortgage_type”,
“objectType”: “field”,
“value”: “debenture”,
“pageIndex”: 5,
“rectangle”: [
26.2029,
104.276848,
49.8368874,
16.9514084
]
},
{
“name”: “created_date”,
“objectType”: “field”,
“value”: “13/01/2009”,
“pageIndex”: 5,
“rectangle”: [
26.7166824,
135.0976,
49.8368874,
18.4924469
]
},
{
“name”: “register_date”,
“objectType”: “field”,
“value”: “20/01/2009”,
“pageIndex”: 5,
“rectangle”: [
26.7166824,
167.459381,
52.4058,
20.547163
]
},
{
“name”: “satisfied_date”,
“objectType”: “field”,
“value”: “Satisfied Date\n\nStatus”,
“pageIndex”: 5,
“rectangle”: [
27.7442474,
197.252762,
78.09492,
17.4650879
]
},
{
“name”: “lender”,
“objectType”: “field”,
“value”: “national westminster bank plc ;”,
“pageIndex”: 5,
“rectangle”: [
25.6891174,
251.702744,
365.299255,
24.6565952
]
},
{
“name”: “amount_secured”,
“objectType”: “field”,
“value”: “all monies due or to become due from the company to the chargee on any account whatsoever”,
“pageIndex”: 5,
“rectangle”: [
25.6891174,
284.0645,
533.8199,
23.6292362
]
},
{
“name”: “details”,
“objectType”: “field”,
“value”: “fi xed and fl oating charges over the undertaking and all property and assets present and future including goodwill uncalled capital buildings fi xtures plant\n andmachinery”,
“pageIndex”: 5,
“rectangle”: [
22.6064224,
314.885254,
536.9025,
47.2584724
]
},
{
“name”: “director_1_block”,
“objectType”: “field”,
“value”: “Name\n Christopher Robert York\n Address\n Lyric House 6b St Andrew Street\n Hertford\n Hertfordshire\n SG14 1JA\n Date of Birth\n 24/12/1961\n Nationality\n British\n\n Directorships for Mr Christopher Robert York\n Company Number Name Status Position Appointed Date Credit Limit Risk Score\n\n 12432488 �� CASTLE LEGAL SERVICES LTD Non trading Director 29/01/2020 £0 0\n\n 03075887 �� CREDITSERVE LTD. Company is dissolved Company Secretary 31/07/2006 £0 0\n\n 03075887 �� CREDITSERVE LTD. Company is dissolved Director 04/07/1995 £0 0\n\n 06534336 �� CREDITSERVE BUSINESS INFORMATION LIMITED Active - Accounts Filed Company Secretary 29/09/2008 £7,500 55\n\n 06534336 �� CREDITSERVE BUSINESS INFORMATION LIMITED Active - Accounts Filed Director 13/03/2008 £7,500 55\n\n Ms Laura York\n Name\n Laura York\n Address\n Lyric House 6b St Andrew Street\n Hertford\n Hertfordshire\n SG14 1JA\n Date of Birth\n 01/06/1964\n Nationality\n British\n\n Directorships for Ms Laura York\n Company Number Name Status Position Appointed Date Credit Limit Risk Score\n\n 06534336 �� CREDITSERVE BUSINESS INFORMATION LIMITED Active - Accounts Filed Director 01/04/2011 £7,500 55\n\n Company Secretary”,
“pageIndex”: 9,
“rectangle”: [
23.5948353,
77.63038,
560.7243,
607.1805
]
}
],
“elapsed”: 0.9833822,
“templateName”: “”,
“templateVersion”: “4”,
“timestamp”: “2025-06-13T09:41:31.000Z”,
“objects_value”: {
“company_name”: “CREDITSERVE BUSINESS INFORMATION LIMITED”,
“reg_number”: “06534336”,
“incorporation_date”: “13/03/2008”,
“registered_office”: “LYRIC HOUSE 6B ST ANDREW STREET , HERTFORD , HERTFORDSHIRE , SG14 1JA”,
“issued_capital”: “100”,
“last_annual_return”: “13/03/2025”,
“ccj_check”: “No Judgments currently registered”,
“ccj_table_row_0”: {
“column1”: “From”,
“column2”: “To”,
“column3”: “No. Outstanding”,
“column4”: “Amount”,
“column5”: “No. of Writs”
},
“ccj_table_row_1”: {
“column1”: “29/05/2022”,
“column2”: “29/05/2025”,
“column3”: “0”,
“column4”: “£0.00”,
“column5”: “0”
},
“ccj_table”: [
{
“column1”: “From”,
“column2”: “To”,
“column3”: “No. Outstanding”,
“column4”: “Amount”,
“column5”: “No. of Writs”
},
{
“column1”: “29/05/2022”,
“column2”: “29/05/2025”,
“column3”: “0”,
“column4”: “£0.00”,
“column5”: “0”
}
],
“legal_notices”: “”,
“total_mortgages”: “1”,
“mortgage_type”: “debenture”,
“created_date”: “13/01/2009”,
“register_date”: “20/01/2009”,
“satisfied_date”: “Satisfied Date\n\nStatus”,
“lender”: “national westminster bank plc ;”,
“amount_secured”: “all monies due or to become due from the company to the chargee on any account whatsoever”,
“details”: “fi xed and fl oating charges over the undertaking and all property and assets present and future including goodwill uncalled capital buildings fi xtures plant\n andmachinery”,
“director_1_block”: “Name\n Christopher Robert York\n Address\n Lyric House 6b St Andrew Street\n Hertford\n Hertfordshire\n SG14 1JA\n Date of Birth\n 24/12/1961\n Nationality\n British\n\n Directorships for Mr Christopher Robert York\n Company Number Name Status Position Appointed Date Credit Limit Risk Score\n\n 12432488 �� CASTLE LEGAL SERVICES LTD Non trading Director 29/01/2020 £0 0\n\n 03075887 �� CREDITSERVE LTD. Company is dissolved Company Secretary 31/07/2006 £0 0\n\n 03075887 �� CREDITSERVE LTD. Company is dissolved Director 04/07/1995 £0 0\n\n 06534336 �� CREDITSERVE BUSINESS INFORMATION LIMITED Active - Accounts Filed Company Secretary 29/09/2008 £7,500 55\n\n 06534336 �� CREDITSERVE BUSINESS INFORMATION LIMITED Active - Accounts Filed Director 13/03/2008 £7,500 55\n\n Ms Laura York\n Name\n Laura York\n Address\n Lyric House 6b St Andrew Street\n Hertford\n Hertfordshire\n SG14 1JA\n Date of Birth\n 01/06/1964\n Nationality\n British\n\n Directorships for Ms Laura York\n Company Number Name Status Position Appointed Date Credit Limit Risk Score\n\n 06534336 �� CREDITSERVE BUSINESS INFORMATION LIMITED Active - Accounts Filed Director 01/04/2011 £7,500 55\n\n Company Secretary”
}
},
“jobId”: “S7YJO5MSC0A3CF5V02U2RHBVNQ268T9H–14-400”,
“credits”: 42,
“remainingCredits”: 9740,
“jobDuration”: 1251,
“duration”: 263,
“name”: “output.json”
}
]

Welcome to the Make community!

The above is not valid JSON. You can verify this by copy-pasting into jsonformatter.org

Could you please try providing it again with the following instructions?

1. This forum might have or already changed your text

When pasting code/text examples into this forum, you should format the content using the richtext editor, otherwise this forum’s software (Discourse) will modify the content, and you might get incorrect answers from others because of it.

Some things this forum software might do to mangle your text:

– remove extra spaces (which may be necessary)
– convert links to titles (when copied is incorrect)
– incorrect joined links
– convert single and double quotes to smart angled quotes (“ ”)
– emojis
– etc.

This interferes with you receiving correct answers, because it:

– makes JSON invalid (you can check by copy-pasting into any JSON editor/formatter like jsonformatter.org)
– makes incorrect text examples when we need to build a pattern for text parsing

2. To prevent this in future, please format text in code blocks

Here are some ways to provide text content in a way that it won’t be modified by the forum.

  • Method 1: Type code fence manually
    Add three backticks ``` before and after the content/bundle, like this,

    ```
    content goes here
    ```

  • Method 2: Highlight and click the format button in the editor

  • Method 3: Upload your file and share the public link
    (this method is only recommended for large files exceeding the forum upload limit)

3. You might need to re-copy the original text

Once the post has been submitted, it’s too late to format it since it’s already modified in the database, and you need to make a re-copy of the text and format it correctly before submitting the forum post.

Please let us know once you have corrected the issue. This will avoid others potentially providing wrong answers based on incorrect text in your question.

Thank you!

Hope this helps! Let me know if there are any further questions or issues. P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

@samliew

I hope this is right?

[
    {
        "status": "success",
        "message": "Success",
        "pageCount": 11,
        "url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/JJ4UPSGJNOXBH8Y22GUV4FICGIO280QX/output.json?X-Amz-Expires=3600&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZJDPLX6D7EHVCKA/20250613/us-west-2/s3/aws4_request&X-Amz-Date=20250613T104148Z&X-Amz-SignedHeaders=host&X-Amz-Signature=96162a305f361f34826672cb76708992754a9a1346469cffef54fded61628a21",
        "outputLinkValidTill": "2025-06-13T11:41:30.4434661+00:00",
        "body": {
            "objects": [
                {
                    "name": "company_name",
                    "objectType": "field",
                    "value": "CREDITSERVE BUSINESS INFORMATION LIMITED",
                    "pageIndex": 0,
                    "rectangle": [
                        23.6339874,
                        141.261734,
                        489.634583,
                        24.6565952
                    ]
                },
                {
                    "name": "reg_number",
                    "objectType": "field",
                    "value": "06534336",
                    "pageIndex": 0,
                    "rectangle": [
                        25.1753349,
                        174.1372,
                        88.884346,
                        23.6292362
                    ]
                },
                {
                    "name": "incorporation_date",
                    "objectType": "field",
                    "value": "13/03/2008",
                    "pageIndex": 0,
                    "rectangle": [
                        25.1753349,
                        205.471619,
                        121.766418,
                        22.60188
                    ]
                },
                {
                    "name": "registered_office",
                    "objectType": "field",
                    "value": "LYRIC HOUSE 6B ST ANDREW STREET , HERTFORD , HERTFORDSHIRE , SG14 1JA",
                    "pageIndex": 0,
                    "rectangle": [
                        26.7166824,
                        236.806046,
                        343.7204,
                        24.1429157
                    ]
                },
                {
                    "name": "issued_capital",
                    "objectType": "field",
                    "value": "100",
                    "pageIndex": 0,
                    "rectangle": [
                        24.14777,
                        269.167816,
                        186.502991,
                        24.1429157
                    ]
                },
                {
                    "name": "last_annual_return",
                    "objectType": "field",
                    "value": "13/03/2025",
                    "pageIndex": 0,
                    "rectangle": [
                        26.7166824,
                        427.380981,
                        101.728905,
                        27.7386684
                    ]
                },
                {
                    "name": "ccj_check",
                    "objectType": "field",
                    "value": "No Judgments currently registered",
                    "pageIndex": 4,
                    "rectangle": [
                        0,
                        0,
                        0,
                        0
                    ]
                },
                {
                    "objectType": "table",
                    "name": "ccj_table",
                    "rows": [
                        {
                            "column1": "From",
                            "column2": "To",
                            "column3": "No. Outstanding",
                            "column4": "Amount",
                            "column5": "No. of Writs"
                        },
                        {
                            "column1": "29/05/2022",
                            "column2": "29/05/2025",
                            "column3": "0",
                            "column4": "£0.00",
                            "column5": "0"
                        }
                    ]
                },
                {
                    "name": "legal_notices",
                    "objectType": "field",
                    "value": ""
                },
                {
                    "name": "total_mortgages",
                    "objectType": "field",
                    "value": "1",
                    "pageIndex": 5,
                    "rectangle": [
                        25.1753349,
                        71.91507,
                        96.0773,
                        24.1429157
                    ]
                },
                {
                    "name": "mortgage_type",
                    "objectType": "field",
                    "value": "debenture",
                    "pageIndex": 5,
                    "rectangle": [
                        26.2029,
                        104.276848,
                        49.8368874,
                        16.9514084
                    ]
                },
                {
                    "name": "created_date",
                    "objectType": "field",
                    "value": "13/01/2009",
                    "pageIndex": 5,
                    "rectangle": [
                        26.7166824,
                        135.0976,
                        49.8368874,
                        18.4924469
                    ]
                },
                {
                    "name": "register_date",
                    "objectType": "field",
                    "value": "20/01/2009",
                    "pageIndex": 5,
                    "rectangle": [
                        26.7166824,
                        167.459381,
                        52.4058,
                        20.547163
                    ]
                },
                {
                    "name": "satisfied_date",
                    "objectType": "field",
                    "value": "Satisfied Date\n\nStatus",
                    "pageIndex": 5,
                    "rectangle": [
                        27.7442474,
                        197.252762,
                        78.09492,
                        17.4650879
                    ]
                },
                {
                    "name": "lender",
                    "objectType": "field",
                    "value": "national westminster bank plc ;",
                    "pageIndex": 5,
                    "rectangle": [
                        25.6891174,
                        251.702744,
                        365.299255,
                        24.6565952
                    ]
                },
                {
                    "name": "amount_secured",
                    "objectType": "field",
                    "value": "all monies due or to become due from the company to the chargee on any account whatsoever",
                    "pageIndex": 5,
                    "rectangle": [
                        25.6891174,
                        284.0645,
                        533.8199,
                        23.6292362
                    ]
                },
                {
                    "name": "details",
                    "objectType": "field",
                    "value": "fi xed and fl oating charges over the undertaking and all property and assets present and future including goodwill uncalled capital buildings fi xtures plant\n andmachinery",
                    "pageIndex": 5,
                    "rectangle": [
                        22.6064224,
                        314.885254,
                        536.9025,
                        47.2584724
                    ]
                },
                {
                    "name": "director_1_block",
                    "objectType": "field",
                    "value": "Name\n Christopher Robert York\n Address\n Lyric House 6b St Andrew Street\n Hertford\n Hertfordshire\n SG14 1JA\n Date of Birth\n 24/12/1961\n Nationality\n British\n\n Directorships for Mr Christopher Robert York\n   Company Number                    Name                         Status             Position        Appointed Date    Credit Limit    Risk Score\n\n   12432488 ��                 CASTLE LEGAL SERVICES LTD               Non trading            Director          29/01/2020         £0           0\n\n   03075887 ��                     CREDITSERVE LTD.                Company is dissolved     Company Secretary      31/07/2006         £0           0\n\n   03075887 ��                     CREDITSERVE LTD.                Company is dissolved        Director          04/07/1995         £0           0\n\n   06534336 ��          CREDITSERVE BUSINESS INFORMATION LIMITED     Active - Accounts Filed    Company Secretary      29/09/2008        £7,500         55\n\n   06534336 ��          CREDITSERVE BUSINESS INFORMATION LIMITED     Active - Accounts Filed        Director          13/03/2008        £7,500         55\n\n Ms Laura York\n Name\n Laura York\n Address\n Lyric House 6b St Andrew Street\n Hertford\n Hertfordshire\n SG14 1JA\n Date of Birth\n 01/06/1964\n Nationality\n British\n\n Directorships for Ms Laura York\n   Company Number                      Name                          Status          Position     Appointed Date     Credit Limit     Risk Score\n\n   06534336 ��            CREDITSERVE BUSINESS INFORMATION LIMITED      Active - Accounts Filed     Director       01/04/2011         £7,500          55\n\n Company Secretary",
                    "pageIndex": 9,
                    "rectangle": [
                        23.5948353,
                        77.63038,
                        560.7243,
                        607.1805
                    ]
                }
            ],
            "elapsed": 0.9833822,
            "templateName": "",
            "templateVersion": "4",
            "timestamp": "2025-06-13T09:41:31.000Z",
            "objects_value": {
                "company_name": "CREDITSERVE BUSINESS INFORMATION LIMITED",
                "reg_number": "06534336",
                "incorporation_date": "13/03/2008",
                "registered_office": "LYRIC HOUSE 6B ST ANDREW STREET , HERTFORD , HERTFORDSHIRE , SG14 1JA",
                "issued_capital": "100",
                "last_annual_return": "13/03/2025",
                "ccj_check": "No Judgments currently registered",
                "ccj_table_row_0": {
                    "column1": "From",
                    "column2": "To",
                    "column3": "No. Outstanding",
                    "column4": "Amount",
                    "column5": "No. of Writs"
                },
                "ccj_table_row_1": {
                    "column1": "29/05/2022",
                    "column2": "29/05/2025",
                    "column3": "0",
                    "column4": "£0.00",
                    "column5": "0"
                },
                "ccj_table": [
                    {
                        "column1": "From",
                        "column2": "To",
                        "column3": "No. Outstanding",
                        "column4": "Amount",
                        "column5": "No. of Writs"
                    },
                    {
                        "column1": "29/05/2022",
                        "column2": "29/05/2025",
                        "column3": "0",
                        "column4": "£0.00",
                        "column5": "0"
                    }
                ],
                "legal_notices": "",
                "total_mortgages": "1",
                "mortgage_type": "debenture",
                "created_date": "13/01/2009",
                "register_date": "20/01/2009",
                "satisfied_date": "Satisfied Date\n\nStatus",
                "lender": "national westminster bank plc ;",
                "amount_secured": "all monies due or to become due from the company to the chargee on any account whatsoever",
                "details": "fi xed and fl oating charges over the undertaking and all property and assets present and future including goodwill uncalled capital buildings fi xtures plant\n andmachinery",
                "director_1_block": "Name\n Christopher Robert York\n Address\n Lyric House 6b St Andrew Street\n Hertford\n Hertfordshire\n SG14 1JA\n Date of Birth\n 24/12/1961\n Nationality\n British\n\n Directorships for Mr Christopher Robert York\n   Company Number                    Name                         Status             Position        Appointed Date    Credit Limit    Risk Score\n\n   12432488 ��                 CASTLE LEGAL SERVICES LTD               Non trading            Director          29/01/2020         £0           0\n\n   03075887 ��                     CREDITSERVE LTD.                Company is dissolved     Company Secretary      31/07/2006         £0           0\n\n   03075887 ��                     CREDITSERVE LTD.                Company is dissolved        Director          04/07/1995         £0           0\n\n   06534336 ��          CREDITSERVE BUSINESS INFORMATION LIMITED     Active - Accounts Filed    Company Secretary      29/09/2008        £7,500         55\n\n   06534336 ��          CREDITSERVE BUSINESS INFORMATION LIMITED     Active - Accounts Filed        Director          13/03/2008        £7,500         55\n\n Ms Laura York\n Name\n Laura York\n Address\n Lyric House 6b St Andrew Street\n Hertford\n Hertfordshire\n SG14 1JA\n Date of Birth\n 01/06/1964\n Nationality\n British\n\n Directorships for Ms Laura York\n   Company Number                      Name                          Status          Position     Appointed Date     Credit Limit     Risk Score\n\n   06534336 ��            CREDITSERVE BUSINESS INFORMATION LIMITED      Active - Accounts Filed     Director       01/04/2011         £7,500          55\n\n Company Secretary"
            }
        },
        "jobId": "S7YJO5MSC0A3CF5V02U2RHBVNQ268T9H--14-400",
        "credits": 42,
        "remainingCredits": 9740,
        "jobDuration": 1251,
        "duration": 263,
        "name": "output.json"
    }
]

Here:

Name\s*\n[\s\S]+?(?=Nationality)

This regex will extract the block of text you need from inside the {{2.body.objects_value.director_1_block}} variable.

Option 1. Then this one for the Name:

Name\s*\n\s*([^\n]+)

This one for the Address:

Address\s*\n([\s\S]+?)(?=\n\s*Date of Birth)

This one for the DoB

Date of Birth\s*\n\s*([0-9]{2}/[0-9]{2}/[0-9]{4})

Option.2 OR you can use split() with {{newline}} and map the items directly from the resulting array. Provided the textblock is the same size every time.

Welcome to the Make community!

You can use a Text Parser “Match Pattern” module with this Pattern (regular expression):

(?:^|\n)\s*Name\s*(?<name>[\w\W]+?)\s+Address\n(?<address>[\w\W]+?)\s+Date of Birth\s+(?<dob>[\w\W]+?)\s+Nationality\s*(?<nationality>[\w\W]+?)(?=\s)

Proof https://regex101.com/r/orxFtY/1

Important Info

  • :warning: Global match must be set to YES (if you want to match more than one person)

For more information, see the Text Parser page in the Make Help Center:

Match Pattern
The Match pattern module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a regular expression, which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.

Hope this helps! Let me know if there are any further questions or issues. P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

@samliew

This is amazing!

I tried to plug these in, but don’t know where I put the first regex to make the rest work? Would you be able to talk it through with me?

I think I’ll go with option 1. Do you know what the regex would be for the Nationality?

I am making my way through the Make Academy, but I really have thrown myself in the deep end!

You just need one regex pattern, instead of using three separate modules, I’ve provided the proof above.