Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

General Discussions

Discuss any topics that are not product-specific here.
SOLVED

Regex replace in a new column

cltccross
6 - Meteoroid

Hi Community,

 

I'm new to this tool, and hit a roadblock on what might be a simple task. I need to extract the date from URLs and write the dates alone to a new column. Is there a way to do this on Regex? I'm only able to replace the current cell as it is using the expression (\d+)[-](\d+)[-](\d+)

 

Any other simpler way to do this would be great as well, if there are no Regex solutions.

6 REPLIES 6
binuacs
21 - Polaris

@cltccross One way of doing this

 

binuacs_1-1673018185432.png

 

 

cltccross
6 - Meteoroid

That was super quick! Thanks

JamesCharnley
13 - Pulsar

Hey @cltccross I'm glad you got a solution quickly! If you're interested in learning you'd be able to do this without Regex using string functions with something like this:

 

JamesCharnley_0-1673018501049.png

 

binuacs
21 - Polaris

@cltccross Another approach that you followed using the Regex Tokenize method

 

binuacs_0-1673018908292.png

 

cltccross
6 - Meteoroid

Thanks a ton, James. I wasn't even aware of string functions till now!

cltccross
6 - Meteoroid

This works best! Thanks a lot. I was using the Tokenize wrong, it seems.

Labels
Top Solution Authors