Can you remove the country code from: info.network?

Support for Windows users
Post Reply
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Can you remove the country code from: info.network?

Post by DevXen »

Hey!

Is there an easy way to remove the Country code from: info.network?

Ideally, i'd like to move the country code from that section and put it in it's own, if it's not US.

[ABC (AU)] - Remove (AU) and add it maybe just after that section [ABC] (AU)
[CBC (CA)] - Remove (CA) and add it maybe just after that section [CBC] (CA)
[Sky Atlantic (UK)] - Remove (UK) and add it maybe just after that section [Sky Atlantic] (UK)
[Comedy Central (US)] - it's in the US so just remove it: [Comedy Central]

By easy I am hoping for a way that doesn't involve a massive match/replace line for each possible tv station and country. haha.

Manually Fixing it on each file/folder and hoping I notice them is just gettting exhauting. haha.

Thanks,
-Clint
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can you remove the country code from: info.network?

Post by rednoah »

This should do:

Code: Select all

{info.network.replaceTrailingBrackets()}
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Can you remove the country code from: info.network?

Post by kim »

Code: Select all

{info.network.replaceAll(/(.+)\s(\(.+\))/, '[$1]$2').replaceAll(/\(US\)/)}
https://regex101.com/r/mwoyui
Post Reply