Get data from text

I want to ask you for help, because I haven’t been able to do this for several days.

I receive a text message with the following content:

Name: John Smith
Phone: 0952145879
Business: Marketing agency
Message: I’m interested in your services

I need to divide this text into separate parts with a map, so that in the next module (for example, create a lead in the CRM) I can choose which data to insert into which fields, or for example, select which data from this application I should send to the messenger.

But I can’t figure out how to do it((
Please tell me, thank you!

Welcome to the Make community!

You can use a Text Parser “Match Pattern” module with this regular expression pattern

Name: (?<name>[^\n]+)[\n\r]+Email: (?<email>[^\n]+)[\n\r]+Phone: (?<phone>[^\n]+)[\n\r]+Business: (?<business>[^\n]+)[\n\r]+Message: (?<message>[^\n]+)

Regex test:


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!


Thank you very much for the detailed answer!
I’m a newbie and just learning how to work with tools.
I copied the regular expression you wrote and got the error:

Perhaps I did something wrong?

Hi @winnt ,

I also tried and I also had a problem.
To solve it, I have copied the regex from this URL: regex101: build, test, and debug regex given by @samliew

/Name: (?<name>[^\n]+)[\n\r]+Email: (?<email>[^\n]+)[\n\r]+Phone: (?<phone>[^\n]+)[\n\r]+Business: (?<business>[^\n]+)[\n\r]+Message: (?<message>[^\n]+)/gm

The regex given here is not correct.


Thank you!
Now everything works)


Hi @winnt and @Michaela

The solution goes to @samliew , he just made a error with a cut/paste, the regex was right in the testing tool.

Redde Caesari quae sunt Caesaris.