You are viewing limited content. For full access, please sign in.

Question

Question

regular expression replace entry name

asked on June 26, 2015

I've been trying to update filenames that were created in unix which have dates in them.

I wanted to set up a workflow and add pattern matching to it so I can create a new file name to replace the old one with.  However, I can't figure out how to use a regular expression to replace the ~ with / 

My files are in the format similar to 1234_filename05~10~2015...more character.

I wanted to know is there is an expression that would return the filename with replacing all the ~ with /

 

0 0

Answer

APPROVED ANSWER
replied on June 26, 2015

Pattern Matching currently does not replace text. But you can still do it with token functions and token formatting. You can use the Split function on "~" to convert it to a multi-value token with 1234_filename05,10,2015, then index it as delimited by / to rebuild it back up as 1234_filename05/10/2015.

3 0

Replies

replied on July 31, 2017

This 1 activity just solved a problem with a comma I was struggling with.  THANKS for having this in Answers.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.