Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Reg Ex - Help with Parse on Field

klyandrews
5 - Atom

Hi Alteryx Community!

 

I have a project I am trying to complete that involves parsing out sections of text from one field. For example I have the following data:

 

PROPERTY: 510291 - COUNTRY (FED) 4-8-9F

PROPERTY: 511243 - SAMPLE 3-15-2H

 

And the end result I want is one field for the numerical portion:

 

510291

511243

 

And then a second field for the name portion

 

COUNTRY (FED) 4-8-9F

SAMPLE 3-15-2H

 

Thoughts on the best syntax to use in RegEx? 

 

Thanks in advance!

1 REPLY 1
jdunkerley79
ACE Emeritus
ACE Emeritus

I suggest:

PROPERTY: (\d+) - (.*)

The numeric bit will get in the first field and then the part after the dash will be in field 2.

 

Sample attached