Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Regex Replace Function

sneha_bhiwagade1
8 - Asteroid

Hi,

 

 REGEX_REPLACE Function to extract particular pattern from end of the string.

 

File path:  C:\Users\XYZ\2018\01\
PreviousMonth: 12

PreviousYear: 2017

Using REGEX_Replace(String, pattern, replace) function want to replace "01" month and year "2018"
with previous month "12" and previous year "2017"

 

Output path should be after using Regex_REPLACE

C:\Users\XYZ\2017\12\

 

Thanks

2 REPLIES 2
jasperlch
12 - Quasar

Hi @sneha_bhiwagade1

 

A combination of Regex, DateTime and Formula tools will do the job:

Capture.PNG

sneha_bhiwagade1
8 - Asteroid

Thank you.

Labels