In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex, parse out last 4 digits if its 4 digits, if its 6 digits, parse out first 4

wonka1234
10 - Fireball

Hi,

 

I am trying to parse this - 

 

TEST_NewUser_IDString_20221031
TEST_NewUser_IDString_202202

to this

 

202210

202202

 

How can I do this with regex?

1 REPLY 1
BrandonB
Alteryx
Alteryx

Give the attached workflow a try. You mentioned 4 characters in your original question, but it looks like you actually want to parse 6 characters. If this is the case you can just change the length parameter in the LEFT function in the formula tool. 

 

 

parsing.png

Labels
Top Solution Authors