Match pattern group and array aggregator

Hello all,
I have a problem with a sequence containing a Match pattern module followed by an Array aggregator module.

I have a text from wich I want to match several pattern with the following regex : (?<type_de_contact>(?<=Type de contact : ).*)|(?<siret_compte>(?<=Numéro de SIRET \/ N° de compte client : ).*)|(?<raison_sociale>(?<=Raison sociale : ).*)|(?<code_postal>(?<=Code postal : ).*)|(?<contact>(?<=Personne à contacter : ).*)|(?<tel>(?<=Téléphone : ).*)|(?<email>(?<=Adresse email : ).*)|(?<secteur>(?<=Intéresseé par : ).*)|(?<newsletter>(?<=Newsletter : ).*)

And I get the following outpout, which seems ok for me :

Then I try to aggregate the values so they become an array and I get the following outpout :

I get an array with 9 collections with 8 out of 9 values being empty in each collection. What I would like is 1 array with 1 collection with all values being filled.

I feel I am missing something obvious or maybe I am misunderstanding what the Array aggregator is supposed to do ?

Thank you for your help.

Welcome to the Make community!

When reaching out for assistance with your regex pattern for a Text Parser module, it would be super helpful if you could share the actual text you’re trying to match. Screenshots of text can be a bit tricky, so if you could copy and paste the text directly here, that would be awesome! It ensures we can run it against test patterns effectively. If there’s any sensitive info, feel free to change it to something fictional yet still valid by keeping the format intact.

Providing clear text examples saves time on both ends and helps us give you the best possible solution. Without proper examples, we might end up playing a guessing game, and nobody wants that as it is a waste of time! You are more likely to get a correct answer faster. So, help us help you by sharing those text snippets. Thanks a bunch!

1 Like

@carlo_fitt Seems like you haven’t select the correct source of your array aggregator. I am assuming you have source which is returning 9 output bundles try to select source which have 1 output bundle or paste some more screenshot of your scenario so i can tell exactly.

Princy Jain
Make consultant,
For consulting support: Follow up Automated

Hi @carlo_fitt
Your regex appears to be functioning properly. Please attempt the same regex pattern after enabling the single-line mode in the settings."

the test data we created for the regex you provided


If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

1 Like

Hello all,
Thank you for your quick answers.

@samliew My bad for the original text, here it is :

Type de contact : prospect

Numéro de SIRET / N° de compte client : 80999990012

Raison sociale : ACME TP

Code postal : 15100

Personne à contacter : veell nicolas

Téléphone : 06********

Adresse email : []

Intéresseé par : Travaux publics

Newsletter : non

@Princy Changing the source of the source of the Array aggregator didn’t make any difference because I wasn’t getting 9 output bundles, but 1 outpout bundle with 9 collections in it. So I get the same result while changing the source.

@Msquare_Automation enabling the single line mode doesn’t get me what I want. I do want an output with 9 bundles on the match pattern module, so I get 9 separate key/value that I can store in an Excel file for exemple.

I managed to get what I want with 9 match pattern modules, each with its own regex but it uses way too much operations.

Any idea on how to do it ?
Thank you

Welcome to the Make community!


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

Type de contact : (?<type_de_contact>.+)\s+Numéro de SIRET \/ N° de compte client : (?<siret_compte>.+)\s+Raison sociale : (?<raison_sociale>.+)\s+Code postal : (?<code_postal>.+)\s+Personne à contacter : (?<contact>.+)\s+Téléphone : (?<tel>.+)\s+Adresse email : (?<email>\S+)[\w\W]+\s+Intéresseé par : (?<secteur>.+)\s+Newsletter : (?<newsletter>.+)


Important Info

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

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


@samliew That worked, thanks a lot!
Sorry to bother you again but could you explain quickly the difference between my regex and yours ?
I am not sure I understand why mine didn’t work, I am a beginner with regex.

Thanks a lot again !

Your regex is built for global (multiple) match. Mine is built for single match.

samliewrequest private consultation