Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

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
Top Solution Authors