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

Help with RegEx

Jmacnevin
7 - Meteor

Hello,

I'm trying to use the RegEx tool to parse the following string of digits contained in a field:

 

-9 followed by 18 random digits.  For example: -9123456789101112131

 

I tried Text to Columns, using "-" as the delimiter; however, there are instances where two or more "-" exist in the field.  There are also instances where a second unique string of -9xxxxxxxxxxxxxxxxxx follows the first string.  I only want the first string of -9xxxxxxxxxxxxxxxxxx. 

 

Using multiple Text to Columns, filters ext seems to give me the result I want, but I would like to find a simpler (and easier to verify) solution.

 

Thanks in advance,

Jeff

 

3 REPLIES 3
KGT
13 - Pulsar

Have you got sample data for the different cases you could come across?

Try this one: (\-[9]\d{18})

Jmacnevin
7 - Meteor

Hi,

Yes.  These are the kinds of records I'm looking at.

thanks 

Jeff

Jmacnevin
7 - Meteor

I believe that worked.  Thanks!!

Labels
Top Solution Authors