Magic ETL Regex

I have a column in my dataset that contains strings of text, similar to the following:

 

Campaign 225 - Facebook - CampaignName.(ThankYou) 4-225_CampaignName

Google Ad - Franchise: Service.(ThankYou) 1-G-Fran_Service

Campaign 225 - Google - I: CampaignName: AdGroupName.(ThankYou) 3-G-225_PT_WFH

 

I want to use the "Replace Text" function to eliminate all text before the bolded text above.

 

Any ideas?

Best Answer

  • czmudzin
    Accepted Answer

    I solved this on my own using the greedy quantifier, in case anyone has the same question. It got me all the way up to the space before the string of interest.

     

    .+(?=[ ]\S)

Answers

  • @czmudzin, glad you were able to figure it out and thank you for posting your solution!

  • Wondering if I could get here. I'm trying to do something similar. I just want Blank Entries to be replaced to "General"

    I tried various combinations:

    • \s
    • ^\s*$
    • ^$

    All to no avail!

    Halp Please?

    Much appreciated!