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

Extracting a specific group of letters and numbers from a string

ANDREEA_GRASIN
5 - Atom

Hi,

 

I need help from you to solve this problem: I have a column named Description containing the Packaging + Plant number + Line number and I need to add a new column with just the Line number as below.

I tried Regex but it was pulling L3 from the PL3, being the first one in the string, instead of what I need ....

 

DescriptionProduction Line
Packaging PL3 L1L1
Packaging PL3 L2L2
Packaging PL1 L1L1
Packaging PL1 L2L2
Packaging Repack PL1L1
Packaging Formed PL1 L3L3
Packaging Formed PL1 L4L4
Packaging Pattie PL1 L4L4
Packaging PL2 L5L5
Packaging PL2 L6L6
Packaging Common PL4L4
Packaging PL4 L3L3
Packaging PL4 L3 SWTSL3
Packaging PL6 L1L1
Packaging PL6 L2L2
Pattie Packaging PL6 L2L2

 

Thank you!

3 REPLIES 3
alexnajm
18 - Pollux
18 - Pollux

How about .+\sPL\d+\s(L\d+).* ?

ANDREEA_GRASIN
5 - Atom

It's perfect! Thank you so much.

alexnajm
18 - Pollux
18 - Pollux

Fantastic! Can you make sure to accept my response as a solution as well? Thank you!

Labels
Top Solution Authors