Regex help please - Parsing a big text area
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am attempting to query for a big long text field from Salesforce and i want to put its contents in a table.
The title of each section ends with "POC" and should be field titles. The stuff below each area below the "POC" titles should be their values.
At this point, the only success we have had was parsing away the parts that ends with POC. The rest of the content in the text input doesn't reach the output. Please help.
- Labels:
- Parse
- Regex
- Salesforce
- Transformation
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@uriah
I would use a Text to Column toos to break the text to each lines then filter out the rows ending with "POC".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yep, what @Qiu did with the text to Columns is exactly what I would have done.
Pre-empting the next question, I imagine you then want to do something with the data below each title. You can do that many different ways. I like to tag the rows as it lets me play with the data a bit more. I would do this with 2 x Multi-row formulas. Some may use Tile in there.
Then decide what you want to do with it.
Multi-row 1:
Field: Category
Type: VWString
Expression: IF Right([Field__c],3) == "POC" THEN [Field__c] ELSE [Row-1:Category] ENDIF
Multi-row 2:
Field: CategoryLine
Type: Int32
Grouping: [Category]
Expression: [Row-1:CategoryLine]+1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Something fun for you - you can put this exact question into AI like ChatGPT or Co Pilot or Perplexity or POE AI to get the formula and resolve the Regex with a more robust answer as well to handle edge cases. Just be specific in the prompt to include that it is done in a Alteryx.
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
amazing. amazing. thanks so much. i owe you guys money . seriously
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
thanks so much. you gotta be one of the best users here. i owe you money. THANK YOU.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Don't sweat it! Just mark the above as accepted solutions so that it helps others identify the solution and try it on their own as well. Cheers @uriah
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
