Text Parser - not working!

I am having issues with text parser. I am reading information from GMAIL - phone number, and want to save it in google sheets.

However, nothing is progressing beyond the Text Parser.

the pattern is:
/(+\d{3})\d{9}/gm

and the text is:

A new attendee has registered to your webinar:

Webinar: מחסלת הסוכר - הילה בן עמרם
Webinar event date: Wednesday, July 24 2024 4:00 PM Jerusalem, Tel Aviv, Nairobi GMT +3
Attendee email: emilyjubran@gmail.com
Attendee name: Emily
Attendee phone: (+972)502240215

If you want to stop receiving these notifications, you may do so by disabling new registrant notifications for this webinar in your WebinarJam account.

thanks for helping!

Welcome to the Make community!

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

(?<phone>\(\+\d{3}\)\d{9})

Proof

https://regex101.com/r/KZxZuH/2

Important Info

  • :warning: Global match must be set to NO!

Output

Screenshot_2024-07-25_130710


For more information, see Text Parser 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 (aka regex or regexp), 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!

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!

Hi thanks for the reply but that’s exactly what I did - and the module still doesn’t output anything… is there another way to do it?

Why not just use a Text Parser Match Elements instead?
The email is nicely formatted such that key:value is clear on each line.

1 Like

Not really, you haven’t shown me that you have used my updated pattern yet.

Please provide a screenshot of your pattern.

Also, please format your example text so that there will be no miscommunication.

1. This forum might have or already changed your text

When pasting text into this forum, you should format the example text using the rich-text editor, otherwise the forum software might modify the displayed text, 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 verify when copy-paste into https://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

A. Type code fence manually
Either add three backticks ``` before and after the text, like this:

```
content goes here
```

B. Highlight and click the format button
Or use the format code button in the editor:
Screenshot_2023-10-02_191027

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 butchered, and you need to make a re-copy of the text, and format it 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!

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!

1 Like

Hi @arielb.amram
Please make sure that global match is enabled.


Output:

Regards,
Msquare Automation - Gold Partner of Make

Book a Free Consultation | Connect Live

Explore our YouTube Channel
for valuable insights and updates!

I found the issue, you forgot to include a capturing group in the pattern.

You can either add a pair of brackets, or

(\(\+\d{3}\)\d{9})

Use a named capturing group:

(?<phone>\(\+\d{3}\)\d{9})

Output

Screenshot_2024-07-25_130710

Module Export

You can copy and paste this module export into your scenario. This will paste the modules shown in my screenshots above.

  1. Copy the JSON code below by clicking the copy button when you mouseover the top-right of the code block
    Screenshot_2024-01-17_200117

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the canvas.

  3. Click on each imported module and save it for validation. You may be prompted to remap some variables and connections.

Click to Expand Module Export Code

JSON - Copy and Paste this directly in the scenario editor

{
    "subflows": [
        {
            "flow": [
                {
                    "id": 66,
                    "module": "regexp:Parser",
                    "version": 1,
                    "parameters": {
                        "pattern": "(?<phone>\\(\\+\\d{3}\\)\\d{9})",
                        "global": false,
                        "sensitive": true,
                        "multiline": false,
                        "singleline": false,
                        "continueWhenNoRes": false
                    },
                    "mapper": {
                        "text": "{{65.value}}"
                    },
                    "metadata": {
                        "designer": {
                            "x": 889,
                            "y": -719,
                            "messages": [
                                {
                                    "category": "last",
                                    "severity": "warning",
                                    "message": "A transformer should not be the last module in the route."
                                }
                            ]
                        },
                        "restore": {},
                        "parameters": [
                            {
                                "name": "pattern",
                                "type": "text",
                                "label": "Pattern",
                                "required": true
                            },
                            {
                                "name": "global",
                                "type": "boolean",
                                "label": "Global match",
                                "required": true
                            },
                            {
                                "name": "sensitive",
                                "type": "boolean",
                                "label": "Case sensitive",
                                "required": true
                            },
                            {
                                "name": "multiline",
                                "type": "boolean",
                                "label": "Multiline",
                                "required": true
                            },
                            {
                                "name": "singleline",
                                "type": "boolean",
                                "label": "Singleline",
                                "required": true
                            },
                            {
                                "name": "continueWhenNoRes",
                                "type": "boolean",
                                "label": "Continue the execution of the route even if the module finds no matches",
                                "required": true
                            }
                        ],
                        "expect": [
                            {
                                "name": "text",
                                "type": "text",
                                "label": "Text"
                            }
                        ],
                        "interface": [
                            {
                                "type": "text",
                                "name": "phone",
                                "label": "phone"
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "metadata": {
        "version": 1
    }
}

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!

This should not be the case really, and should be reported as a bug because we only want a single match. This advice also can cause issues if there are multiple bundles when they are expecting only one match.

For technical issues or bugs like this, directly contacting support can often lead to a faster resolution. They have access to your specific account details, scenario and scenario logs, server-side logs, and internal tools and resources, which allows them to investigate more thoroughly than what you have access to. Additionally, sharing sensitive information about your account or scenario might not be suitable for an open forum discussion.

You can open a new ticket here, or if you are unable to login for some reason, you can create another new free account to access the ticketing system (which is only available to logged-in users). Alternatively, you should be able to send an email to helpdesk@make.com and support@make.com and it should create a ticket. After submitting a new ticket, you will receive an automatic confirmation email with the subject “Ticket Created” in the subject. If you do not receive this, try sending the ticket again.

Join the Make Fans Discord server to chat with other makers!