Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Need help building a regular expression for a certain pattern

AkisM
10 - Fireball

I want to be able to extract a 12digit string that is a random combination of upper case letters and numbers. I'm very new to RegEx and having trouble with it. I tried \w{12} but obviously this has the drawback of also pulling actual words of length 12 or higher. My data looks like this:

 

Thanks in advance.

 

Random Industry Name
Farland Corp. US15347821046
Elenium Advisors Ltd GB0009252882
McDonalds Corp. US58135Q1031
Abionic PLC IE02BTN1Y115
Nova Diet AG CH0042005267
Porsche Holdings AG o.N. CH0012052048
Random Industry Name 2
Special Specialties Inc. US02079K1079
Donald Trump Inc. US13275R1023
Animalius Corp. US4586401001
Megaman Corp. US5942182045
South Division Co. US9296021098
Random Industry Name 3
ABB Ltd. CH0012221716
0.225 % NISSAN Finance N.V. 17-12.1.21
XS1548536556, m. 01/12/2021
0.275 % LM-CIC Home Loan SFH 16-12.9.22
FR0313143453, m. 09/12/2022
Foreign Currency Bonds
Schumacher Euro Alternativ (T)
AT0003320386
Structured Interest Rate Products
Schoellerbank Zinsstruktur Plus (A)
AT2000497409
Shumacher Realzins (A)
AT0404672258
EUR Bonds
0.325 % AMD ALMD N.V. 16-31.5.22
XS1724441202, m. 05/31/2022
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2 REPLIES 2
LukeM
Moderator
Moderator

Hi @AkisM 

 

Try:

 

[0-9A-Z]{12}

 

The information in square brackets identifies what we want to match (so numbers 0-9 and uppercase between a and z).

 

Make sure you make it case sensitive.

 

Luke

AkisM
10 - Fireball

Thank you, works like a charm

Labels