Hello All,
I have a code where I am trying to replace the space with '/' using RegEx but not getting desired output.
I wrote the code in dynamic input tool,
IF [_CurrentField_] = 'Name'
THEN 'Type'
ELSE 'Week of ' + Regex_Replace(Replace([_CurrentField_],'_', ' '),'^\d+\s','')
ENDIF
Image 1 is before running the workflow and Image 2 is after running the workflow where I want the date separated by '/'.
Can anyone help me to do this.
Thank you
Solved! Go to Solution.
Hi @akshayhendre,
I've edited your formula slightly to introduce another Regex_Replace() function
IF [_CurrentField_] = 'Name'
THEN 'Type'
ELSE 'Week of ' + Regex_Replace(Regex_Replace(Replace([_CurrentField_],'_', ' '),'^\d+\s',''), '(\d)\s(\d)', '$1/$2')
ENDIF
If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.
Regards,
Jonathan
Your expression was very close to working!
Try Regex_Replace(Replace([_CurrentField_], '_', '/'), '^\d+/', '')
I changed to add the / in the inner Replace function, then adjusted your Regex_Replace to account for this.
Thank you @Jonathan-Sherman and @Hannah_Lissaman, both the solutions worked for me