Page 1 of 1

[SNIPPET] Replace : colon with - dash

Posted: 29 Jan 2022, 05:47
by rednoah
The String.colon() method can be used to replace : colon and surrounding spaces with a custom replacement characters.


:idea: Note that the {plex} format is most suitable for beginners and advanced users alike. {plex} and {plex.name} will take care replacing : colon with - dash among other things:

Format: Select all

{ plex.name }

e.g. movie format

Format: Select all

{ ny.colon(' - ') }

e.g. episode format

Format: Select all

{ n.colon(' - ') } - { s00e00 } - { t.colon(' - ') }

e.g. custom character replacement

Format: Select all

{ n.replace(':':'-', '?':'', '&':'and') }