We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

find string with certain text and number after that string

Nmassarone
8 - Asteroid

Hello I'm looking for help with a table i have where I'm trying to extract a certain string within a longer string in a cell.

 

i posted below an example i have a long string name and inside that string I'm trying to extract the IRK or BRK within that string along with the numbers after it. The only thing is the IRK or BRK number may be in various points along the string and some are not always separated by themselves they might have a - or be connected to a word. Also the numbers after the IRK or BRK are random and are not always the same.

 

i posted below an example of the table and the ideal column i would want outputted

 

The Record_Num is the ideal column I would like extracted from the string to be displayed wasnt sure if there was a certain regex that would help.

 

i tried searching all over to see if there was a solution for this but couldn't find anything if someone is able to help with this it would be greatly appreciated.

 

This is the table and the REG_NM is where the IRK or BRK number is and the Record_Num column is what i would ideally like displayed extracting that IRK or BRK number from the REG_NM column.

 

ACCT_STUS_DESCREG_NMRecord_Num
OPENRECORDKEEPERDIRECT -BRK54321 COMPASSIONATE FRIENDS PLAN SHANEBRK54321
OPENRECORDKEEPERDIRECT -BRK54321 COMPASSIONATE FRIENDS PLAN JOHNBRK54321
CLOSEDROSEVILLE  401K PSP ACCOUNT    -BRK12345 ROSEVILLEBRK12345
OPENRECORDKEEPER DIRECT - IRK9876 JOHN SMITH DDS MS LLC 401K KIMIRK9876
CLOSEDCLEAR ZONE INC FORFEITURE - IRK2345 CLEAR ZONE INCIRK2345
CLOSEDRECORDKEEPERDIRECT - IRK3456 ANGEL CARE JASIRK3456
CLOSEDRECORDKEEPERDIRECT - IRK3456 ANGEL CARE MARVIRK3456
CLOSEDBRO RECORDKEEPING - BRK6789 SUMMIT SCHOOL JASONBRK6789
OPENBRO RECORDKEEPING - BRK6789 SUMMIT SCHOOL CHARLESBRK6789
CLOSEDCYNETSIC 401K PLAN EXPENSE ACCOUNT    - IRK4567 CYNETSIC 401K PLANIRK4567
CLOSEDVG GROUP PLAN ACCOUNT    - IRK8765 VG GROUP PLANIRK8765
OPENRECORDKEEPERDIRECT -IRK65432 AMERICAN COMM 403B KENIAIRK65432
CLOSEDSMITH & ASSOC SC 401K FORFEITURE ACCOUNT - BRK76543 SMITH & ASSOCIATES SCBRK76543
OPENRECORDKEEPERDIRECT -IRK1928 AMERICAN COMM 403B JOHNIRK1928
OPENBRO RECORDKEEPING - BRK6789SUMMIT SCHOOL CHRISTINABRK6789

 

 

Any Help would be greatly appreciated.

 

thank you in advance.

3 REPLIES 3
MilindG
12 - Quasar

I have used Regex to solve this. Check out the file :)

DataNath
17 - Castor
17 - Castor

Here's how I'd do this with RegEx, as long as IRK/BRK are the only two starting points for the target.

 

([IRK|BRK]+\d+)

 

DataNath_0-1661266080812.png

Nmassarone
8 - Asteroid

Awesome Thank you so much @DataNath  and @MilindG  both worked perfect appreciate the help on this. thank you.

Labels
Top Solution Authors