# Text Parser - not working!

**URL:** <https://community.make.com/t/text-parser-not-working/47651>\
**Category:** Questions\
**Tags:** text-parser, error, mapping\
**Created:** [July 24, 2024, 12:51pm UTC](https://community.make.com/t/text-parser-not-working/47651 "2024-07-24T12:51:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![arielb.amram](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@arielb.amram](https://community.make.com/u/arielb.amram)\
**Post date:** [July 24, 2024, 12:51pm UTC](https://community.make.com/t/text-parser-not-working/47651/1 "2024-07-24T12:51:26Z")

</div>

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](mailto: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!

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [July 24, 2024, 1:23pm UTC](https://community.make.com/t/text-parser-not-working/47651/2 "2024-07-24T13:23:32Z")

</div>

Welcome to the Make community!

 ![](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/3/a/3a0c58927f26b0aa42ae058e92d98af878686a3a.png)

You can use a Text Parser “[Match Pattern](https://www.make.com/en/help/tools/text-parser)” module with this Pattern (regular expression):

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

```

### Proof

[https://regex101.com/r/KZxZuH/2](https://regex101.com/r/KZxZuH/2)

### Important Info

- ⚠ **Global match** must be set to **NO**!

## Output

 ![Screenshot_2024-07-25_130710](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/9/7/973e4670817dfa1862618aad034313dbfb5daadb.png)

* * *

For more information, see [Text Parser](https://www.make.com/en/help/tools/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](https://en.wikipedia.org/wiki/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.
> 
> - The complete list of metacharacters can be found on the [MDN web docs website](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions).
> - For a tutorial on how to create regular expressions, we recommend the [RegexOne website](https://regexone.com/).
> - For an easy, quick regex generator, try the [Regular Expressions generator](https://regex-generator.olafneumann.org/).
> - For experimenting with regular expressions, we recommend the [regular expressions 101 website](https://regex101.com/). Just make sure to tick the ECMAScript (JavaScript) FLAVOR in the left panel.

Hope this helps!

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the [Make Fans](https://samliew.com/make-discord-invite) Discord server to [chat](https://samliew.com/make-discord-invite) with other makers!

---

<div class="post-metadata">

**Author:** ![arielb.amram](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@arielb.amram](https://community.make.com/u/arielb.amram)\
**Post date:** [July 24, 2024, 1:47pm UTC](https://community.make.com/t/text-parser-not-working/47651/3 "2024-07-24T13:47:52Z")

</div>

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?

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/3/d/3d34e62ab15804cec63dddc255670b2e65d62729.png)

---

<div class="post-metadata">

**Author:** ![Donald\_Mitchell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/donald_mitchell/32/8749_2.png) [@Donald\_Mitchell](https://community.make.com/u/Donald_Mitchell)\
**Post date:** [July 24, 2024, 2:06pm UTC](https://community.make.com/t/text-parser-not-working/47651/4 "2024-07-24T14:06:33Z")

</div>

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

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/0/d02c73ec06ee9a2f7fc98d049f2b1f6158a96039.png)

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [July 24, 2024, 2:15pm UTC](https://community.make.com/t/text-parser-not-working/47651/5 "2024-07-24T14:15:29Z")

</div>

> [@arielb.amram](#):
>
> that’s exactly what I did

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](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](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/b/4/b485b6572c7a1c438f9b191c54e63d351008304c.png)

## 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!

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the [Make Fans](https://samliew.com/make-discord-invite) Discord server to [chat](https://samliew.com/make-discord-invite) with other makers!

---

<div class="post-metadata">

**Author:** ![Msquare\_Automation](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/msquare_automation/32/6634_2.png) [@Msquare\_Automation](https://community.make.com/u/Msquare_Automation)\
**Post date:** [July 25, 2024, 4:48am UTC](https://community.make.com/t/text-parser-not-working/47651/6 "2024-07-25T04:48:27Z")

</div>

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

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/5/9/590ed25631810e3d3fb3b1875e8d9d57024a8a90.png)  
Output:  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/9/0/90b2dcb2ec9f0d1376a4d1a6ed0fac722b3531a3.png)

**Regards,**  
_Msquare Automation - Gold Partner of Make_

> [Book a Free Consultation](https://calendly.com/msquarepro/meeting) | [Connect Live](https://calendly.com/msquarepro/msquareautomation-live)

Explore our [**YouTube Channel**](https://www.youtube.com/@msquareautomation)  
for valuable insights and updates!

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [July 25, 2024, 5:04am UTC](https://community.make.com/t/text-parser-not-working/47651/7 "2024-07-25T05:04:44Z")

</div>

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

You can either add a pair of brackets, or

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

```

Use a named capturing group:

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

```

 ![Screenshot_2024-07-25_130726](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/2/624982adff382a8b0922a33c21b537f78a4f9214.png)

### Output

 ![Screenshot_2024-07-25_130710](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/9/7/973e4670817dfa1862618aad034313dbfb5daadb.png)

## 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](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/b/2b1b692880388420db5045bf51ef344e6698a816.png)

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
> 
> ```json
> {
> "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
> }
> }
> 
> ```

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the [Make Fans](https://samliew.com/make-discord-invite) Discord server to [chat](https://samliew.com/make-discord-invite) with other makers!

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [July 25, 2024, 5:07am UTC](https://community.make.com/t/text-parser-not-working/47651/8 "2024-07-25T05:07:11Z")

</div>

> [@Msquare\_Automation](#):
>
> Please make sure that global match is enabled.

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](https://www.make.com/ticket) 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](https://www.make.com/ticket), 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](mailto:helpdesk@make.com) and [support@make.com](mailto: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](https://samliew.com/make-discord-invite) Discord server to [chat](https://samliew.com/make-discord-invite) with other makers!

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [October 23, 2024, 5:09am UTC](https://community.make.com/t/text-parser-not-working/47651/9 "2024-10-23T05:09:48Z")

</div>


