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

Support for Windows 10 users and the Microsoft Store package
Post Reply
DevXen
Power User
Posts: 111
Joined: 12 Oct 2014, 21:15

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

Post by DevXen » 08 Jun 2019, 16:51

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: 16615
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah » 08 Jun 2019, 17:23

This should do:

Code: Select all

{info.network.replaceTrailingBrackets()}
:idea: Please read the FAQ and How to Request Help.

kim
Power User
Posts: 802
Joined: 15 May 2014, 16:17

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

Post by kim » 08 Jun 2019, 20:50

Code: Select all

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

Post Reply