Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Reg Ex help please



I am hoping someone can lend some assistance here.  I am trying to parse out the statement that is embedded in a bunch of garbage data see examples below.  I have tried trimming, using a formula but believe regex would be the best solution but I am having a issue because as you can see each row contains differing amounts of leading and trailing characters.  What would be the best approach here? 


lue0;}\viewkind4\uc1 d\b\f0\fs19 Grievance Description\cf1\b0\f1\fs20     Received standard QOC from member by phone stating he was dissatisfied with the cost of his Amitriptylin. Member states it is usually only $30/month but when he went on 12/12 it jumped to 160.41   d\tx720\cf0\b\f0\fs19    d\cf1\b0\f1\fs20    d   }
prq1\fcharset0 Courier;}}{\colortbl ;\red0\green0\blue0;}\viewkind4\uc1 d\ltrpar\tx720\b\f0\fs20 Grievance Description   d\ltrpar\cf1\b0\f1\fs21 Member has filed a grievance by phone on December 19 2018 against Walgreens as she ordered her Losartan 100MG medication approximately 3 weeks ago on December 5 2018 and has yet to receive the medication. She went into her local Walgreens Pharmacy on December 19 2018 and requested a small supply until she received the order that she placed with the mail order. She was told that the medication was delayed in transit and it should be received by Friday December 21 2018 but she is upset that she was still charged the full out-of-pocket copayment for her medication and is now owed a refund in the amount of $22.79. \f2\fs20   }
lue0;}\viewkind4\uc1 d\tx720\b\f0\fs19 Grievance Description     d\cf1\b0\f1\fs20 Received standard from the member by phone stating he could not afford his Eliquis because he has reached the coverage gap   d   }
Alteryx Certified Partner
Alteryx Certified Partner

How cleaned up does this need to be? It's easy to remove any word (string of characters bound by spaces) that contains the "\" character and that seems to be 90% of what needs to be done here and the results are readable. The problem with this is that it eliminates "Description\cf1\b0\f1\fs20" too.




I was hoping to get it as clean as possible.  90% is a lot closer than what I was able to obtain.



I took a stab at this just using a series of nested Regex statements.  Please note that it seems like in your example data there are a few different ending characteristics (EG: "d  }" vs " }", and so this may not cover all examples throughout your use case.


I also encountered the same challenge as @CharlieS regarding "Grievance Description".