# Google Sheet + Text parser / regex

**URL:** <https://community.make.com/t/google-sheet-text-parser-regex/58950>\
**Category:** Questions\
**Tags:** regular-expressions, text-parser, mapping\
**Created:** [October 28, 2024, 7:26am UTC](https://community.make.com/t/google-sheet-text-parser-regex/58950 "2024-10-28T07:26:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sophie\_Masliah](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sophie\_Masliah](https://community.make.com/u/Sophie_Masliah)\
**Post date:** [October 28, 2024, 7:26am UTC](https://community.make.com/t/google-sheet-text-parser-regex/58950/1 "2024-10-28T07:26:18Z")

</div>

Hello,

I need help extracting content from an email. I think my regex might be incorrect.

Here is the email content:

Bonjour,  
Nous avons reçu une demande d’informations pour votre centre - 26579 City  
Formation souhaitée : Formation à Chat GPT et à l’IA  
Modalité : Non défini  
Demandeur : John Doe  
Statut : Salarié en poste  
Email : [john@email.fr](mailto:john@email.fr)  
Téléphone : 0609060906  
Niveau de formation : BAC +3  
Mode de validation : Sms  
Type de demande d’information : Inconnu  
Message du candidat : Bonjour, Je souhaite avoir plus de renseignements sur cette formation. Merci.  
Pour une mise en relation efficace, nous vous conseillons de donner suite à cette demande dans un délai de 48h.  
À bientôt sur MaFormation.

I want to extract : Formation souhaitée / Demandeur / Email / Téléphone

Here’s my regex:  
Formation souhaitée : (?\<formation\_souhaitee\>.+?)\s+Demandeur : (?[\w\s]+)\s+Email : (?[\w.-]+@[\w.-]+.\w+)\s+Téléphone : (?\d{10})

And here are the screenshots of my scenario:

 ![Capture d’écran 2024-10-28 à 08.11.47](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/9/1/91c369c51584983e3d500348467fac0ab4e0d125.png)

 ![Capture d’écran 2024-10-28 à 08.21.21](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/a/f/af43ab8c3aaa843c8d1d0e98f12588bacfe75408.png)

 ![Capture d’écran 2024-10-28 à 08.14.28](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/c/5/c5b5a0917cacbcaabd3843b1ee4213e3eac9dae7.png)

 ![Capture d’écran 2024-10-28 à 08.14.37](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/3/a/3a8cf9790624157d31648b0dbb2d984c247371a4.png)

 ![Capture d’écran 2024-10-28 à 08.15.06](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/5/051e850d6931f21f71434d8f1737bc0112a42497.png)

I have no idea what I should do.  
Thank you for your help

---

<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:** [October 28, 2024, 1:53pm UTC](https://community.make.com/t/google-sheet-text-parser-regex/58950/2 "2024-10-28T13:53:15Z")

</div>

Welcome to the Make community!

Could you go to [regex101.com](http://regex101.com), paste in your Pattern at the top and paste a complete/full example text you are trying to match from below it?

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

Then, **save** the regex example and **share the link** with us here.

This will allow others to assist you here with your pattern. Thanks!

— @samliew

P.S.: Investing some effort into the [Make Academy](https://academy.make.com) will save you lots of time and frustration using Make.

---

<div class="post-metadata">

**Author:** ![Sophie\_Masliah](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sophie\_Masliah](https://community.make.com/u/Sophie_Masliah)\
**Post date:** [October 28, 2024, 6:42pm UTC](https://community.make.com/t/google-sheet-text-parser-regex/58950/3 "2024-10-28T18:42:02Z")

</div>

Hello,

thank you for your answer.  
Here is the link : [regex101: build, test, and debug regex](https://regex101.com/r/crNDJC/1)

---

<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:** [October 29, 2024, 12:31am UTC](https://community.make.com/t/google-sheet-text-parser-regex/58950/4 "2024-10-29T00:31:44Z")

</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):

`Formation souhaitée : (?<formation_souhaitee>.+)[\w\W]+?Demandeur : (?<demandeur>.+)[\w\W]+?Email : (?<email>.+)[\w\W]+?Téléphone : (?<telephone>.+)`

**Proof** [https://regex101.com/r/sCoyiZ/1](https://regex101.com/r/sCoyiZ/1)

### Important Info

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

* * *

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! Let me know if there are any further questions or issues.

— @samliew

P.S.: Investing some effort into the [Make Academy](https://academy.make.com) will save you lots of time and frustration using Make.

---

<div class="post-metadata">

**Author:** ![Sophie\_Masliah](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sophie\_Masliah](https://community.make.com/u/Sophie_Masliah)\
**Post date:** [October 29, 2024, 6:59am UTC](https://community.make.com/t/google-sheet-text-parser-regex/58950/5 "2024-10-29T06:59:59Z")

</div>

> [@samliew](#):
>
> Formation souhaitée : (?\<formation\_souhaitee\>.+)[\w\W]+?Demandeur : (?.+)[\w\W]+?Email : (?.+)[\w\W]+?Téléphone : (?.+)

Thank you it works !  
So I have to improv my regex knowledge.

---

<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:** [November 12, 2024, 7:12am UTC](https://community.make.com/t/google-sheet-text-parser-regex/58950/6 "2024-11-12T07:12:05Z")

</div>

This topic was automatically closed because it's resolved or inactive. Please, start a new topic.


