[SNIPPET] Replace : colon with - dash

All about user-defined episode / movie format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 21718
Joined: 16 Nov 2011, 08:59

[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:

Code: Select all

{plex.name}

e.g. movie format

Code: Select all

{ ny.colon(' - ') }
e.g. episode format

Code: Select all

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

e.g. custom character replacement

Code: Select all

{ n.replace(':' : '', '-' : '', '&' : 'and') }
:idea: Please read the FAQ and How to Request Help.
Post Reply