Join the Inspire AMA with Joshua Burkhow, March 31-April 4. Ask, share, and connect with the Alteryx community!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

RegEx formula

alexisdewaine
5 - Atom

I have the below transaction description, and I would like to use RegEx to only keep the bold portion. I have several line items with this layout, and cannot figure out how to delete the before and after words around the bold investment. For all line items, I'd like to delete everything prior to xxxxnumbers and after "TRN".

 

FUNDS WIRED TO:SVB, A DIVISION OF FIRST CITIZENS B ACCT: XXXX0000 3PM FAKE INVESTMENT CO TRN #2424210 PM FAKE INVESTMENT CO CAPITAL CALL

2 REPLIES 2
Carolyn
12 - Quasar
12 - Quasar

Hey! You'll want to use the Formula Tool with the RegEx_Replace formula. Instead of deleting the before and after, you'll keep the middle but putting it in ( ) and then putting $1 in the 3rd part of the clause, to indicate to return the 1st parenthesis'd clause

 

Replace "Before", "Keep", and "After", with your RegEx

 

RegEx_Replace([Field], "Before(Keep)After", "$1")

 

binuacs
21 - Polaris
Labels
Top Solution Authors