We are aware of an issue with the Search bar. Please use Advanced search for the time being while we troubleshoot. Thanks for your patience as we work on improving the community!

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Get all words that come between 2 substrings

7 - Meteor

I have a table and one column has text like 

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Consumer contact information: John Doe (xxx)xxx-xxxx. Name of organization: Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

From this text, I only want "John Doe (xxx)xxx-xxxx.". 
Is there a way to get data that comes between the substrings Consumer contact information and Name of organization.
The text that comes before Consumer contact information can be of varying length.

17 - Castor
17 - Castor

RegEx to the rescue here. Try the following expression in a RegEx tool in Parse Mode:


(?<=Consumer contact information: )(.*)(?= Name of organization:)


RegEx breakdown:

The overall structure is that you're identifying a beginning marker, then saying you want any characters that come next until the next marker comes along. Each of these three "steps" is bound by parenthesis in the statement above.


The attached workflow shows this in action.


Hi @smarapad 


You can use the regex tool to solve this problem. I have attached a workflow that completes this task.


Here is documentation on the regex tool.



Let me know if this is helpful.