IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

 
Reply to this topicStart new topic
> Enclose Disc Numbers in Brackets, Putting Brackets around Disc Numbers
gavinmag
post Sep 9 2017, 01:11
Post #1


Member


Group: Full Members
Posts: 5
Joined: 22-March 11
Member No.: 14059
Mp3tag Version: 2.48



What I am trying to do is enclose disc numbers in brackets

For example
Disc 1 would become (Disc 1)
Disc 2 would become (Disc 2)
Disc 12 would become (Disc 12)
Disc 20 would become (Disc 20)

I can get Disc 1 to (Disc 1) and Disc 2 to (Disc 2) but when it comes to double digits the whole thing falls in a heap so I need your help please. I work in community radio and this feature is very important for cataloguing purposes

Thanks
Gavin
Go to the top of the page
 
+Quote Post
stevehero
post Sep 9 2017, 02:15
Post #2


Member


Group: Full Members
Posts: 824
Joined: 3-December 10
From: Ireland
Member No.: 13334
Mp3tag Version: 2.84



QUOTE (gavinmag @ Sep 9 2017, 01:11) *
What I am trying to do is enclose disc numbers in brackets

For example
Disc 1 would become (Disc 1)
Disc 2 would become (Disc 2)
Disc 12 would become (Disc 12)
Disc 20 would become (Disc 20)

I can get Disc 1 to (Disc 1) and Disc 2 to (Disc 2) but when it comes to double digits the whole thing falls in a heap so I need your help please. I work in community radio and this feature is very important for cataloguing purposes

Thanks
Gavin

Use replace with regular expression action.

Replace.
(?i)(?!\()Disc\s+(\d+)(?!\))

With:
(Disc $1)

Reason for edit:
Used negative lookaheads method

This post has been edited by stevehero: Sep 9 2017, 02:31


--------------------
Go to the top of the page
 
+Quote Post
gavinmag
post Sep 9 2017, 08:49
Post #3


Member


Group: Full Members
Posts: 5
Joined: 22-March 11
Member No.: 14059
Mp3tag Version: 2.48



QUOTE (stevehero @ Sep 9 2017, 11:15) *
Use replace with regular expression action.

Replace.
(?i)(?!\()Disc\s+(\d+)(?!\))

With:
(Disc $1)

Reason for edit:
Used negative lookaheads method

Many Many Thanks
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th September 2017 - 16:13