Transform ', ' into newlines

Started by jeno, November 06, 2015, 11:51:48 AM

Previous topic - Next topic

jeno

Hello,

May I know how to replace ', ' with a newline?  ${TAG;tr/, /\n/} doesn't seem to work.

I want to transform this:
PANTONE 206 C, Alpha 1, PANTONE Pink C

Into this:
PANTONE 206 C
Alpha 1
PANTONE Pink C

Phil Harvey

"tr" translates individual characters.  What you want is a string substitution (s) with a global find-and-replace: ${TAG;s/, /\n/g}

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).