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.
Solved! Go to Solution.
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.
https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689
Let me know if this is helpful.
Luke
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |