Community Halloween is live until October 31st! Complete any 2 quick activities to earn the 2025 Community Halloween badge. Feeling brave? Check out the activities here
Start Free Trial

Alteryx Designer Desktop Discussions

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

regular expression help

10005970
6 - Meteoroid

Hi

I have a data field that contains location/document header/line number. the format is as follows:

217/101212/1

217/10012/10

212/1002003/100

I am trying to extract just the order header (the bit in the middle of the //) I am using the regex tool in parse to create an extra field "Order Header" but I cannot seem to get the expression correct.

 

Your help would be appreciated.

4 REPLIES 4
binu_acs
21 - Polaris

@10005970 

 

REGEX_Replace([Data], '(.+)\/(.+)\/(.+)', '$2')

 

binuacs_0-1645176867078.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @10005970 

 

My take on this

 

REGEX_Replace([Input], ".*/(\d+)/.*", "$1")

 

atcodedog05_0-1645177083813.png

Hope this helps : )

 

10005970
6 - Meteoroid

Spot on, thank you 

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @10005970 

Cheers and have a nice day!

Labels
Top Solution Authors