[SNIPPET] Replace : colon with - dash

All about user-defined episode / movie / file name format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[SNIPPET] Replace : colon with - dash

Post 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') }
:idea: Please read the FAQ and How to Request Help.
Post Reply