Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Looking to Extract a Unique ID from a String of Data

theblondeanalyst
5 - Atom

Hi, 

 

As noted I am looking to extract a unique ID from a string of data using a function to create a new column called "Transaction ID". Each transaction ID is embedded in the description column and contains the first letters of "id:trxn:" and then subsequent numbers/letters as shown below. What can I use to do this?

 

AccountChkRefDebitCreditBalanceDateDescription
1234567910 1,200,000.00 -1,200,000.009/01/2024
Outgoing Wire ABCD Peach id:trxn4pqPK792a90HGA901j3lPo9Ha1s
1234567910 2,343,997.00 -2,343,997.009/02/2024
Outgoing Wire EFGH Pear id:trxn4pqzb1qqRy7fcghTQj5Qd1pFbWD
1234567910 1,231,829.00 -1,231,829.009/03/2024
Outgoing Wire IJKL Apple id:trxn4pqGdXYAw2kJtlMd39aENjjlMI
1234567910 3,457,482.00 -3,457,482.009/04/2024
Outgoing Wire MNOP Hen id:trxn4pqcUmWWgWZaBJXidPvlksHZmcx

 

Note - data used in this is false for illustrative purposes only! 

 

3 REPLIES 3
cpet13
11 - Bolide

Using the regex tool should get you what you want, I believe. Here is an example of how you can use it.

binuacs
21 - Polaris

@theblondeanalyst one way of doing this with Regex_Replace() function

image.png

nagakavyasri
12 - Quasar

@theblondeanalyst Can try either formula or Regex tool:

 

Screenshot 2024-11-13 125441.png

Labels