Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

regex pulling numbers before a specific -

Wynn
8 - Asteroid

Hello, 

Could anyone help me with the Regex formulas to pull the account numbers in column A of the attached workbook. I'm trying to pull the account numbers which essentially the numbers coming before the "-" ( not the "-" coming between the numbers as these numbers are considered to be part of the account numbers. The rest we can get rid of it.

Example: Line 20- 25, say I just want to pull the number 31-110, 31-115 , 31-120 only . They are account numbers . Line 57 or 54 , I do need the numbers. Could you please help with this? Thanks so much 

2 REPLIES 2
bpatel
Alteryx Alumni (Retired)

hi @Wynn ,

 

is this what you are looking for? hope it helps!

 

bpatel_0-1582061125793.png

 

fmvizcaino
17 - Castor
17 - Castor

Hi @Wynn ,

 

Attached is an example where I get everything you need with one regular expression.

Take a look and let me know if this works for you.

 

Best,

Fernando Vizcaino

Labels