Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Trying to isolate part number with Left and Find String

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@oneillp111 ,

 

 would you believe my dog jumped on the keyboard and created it?

 

Trim(regex_replace([text field],"([0-9A-Za-z\s])\u*\s*\u*",'$1'))

 

the outer trim removes space from the beginning and end I if the regular expression replacement. 

the \u*\s*\u* is the trick. We're looking for a single word or two words. \s* means that there could be zero or many spaces between one it two words at the end of the text. 

everything before it, if letters, numbers or spaces is what we're after. 

cheers,

 

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
8 - Asteroid

@MarqueeCrew , 

 

I ran into a problem with this and hoping you can help.

 

Here is the data to parse

7741254698 CA9 4R

 

I need 7741254698 but I get 774125469894.  I know how to keep it to the length of 10, however that is not always the case, sometimes the first number is 11 digits and sometimes it is less than 10.  Any Ideas 🙂

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@oneillp111 

 

Getword([data],0)

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Labels