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.

> Regular Expressions, Examples of actions with Regular Expressions
Florian
post Oct 16 2003, 19:47
Post #1


Developer


Group: Admin
Posts: 7710
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.63



This thread collects some useful regular expressions.

If you created a regular expression which solves a common task, please post it here and give a short description what it is supposed to do.

These regular expressions can be used with the action type Replace with regular expression. Please look at FAQ: How do I create a new action? to learn more about actions in Mp3tag.

-> If you have problems with a regular expression, please open a separate topic.


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
KCE
post Oct 24 2008, 23:08
Post #2


Member


Group: Members
Posts: 1
Joined: 24-October 08
Member No.: 7778
Mp3tag Version: 2.41



Really simple but this will remove any parenthesis and its contents in any part of the string

Example:
Blah (blah1) (blah 2)
Result:
Blah

Regular expression: \(.+?\)

Replace matches with:

This post has been edited by KCE: Oct 24 2008, 23:08
Go to the top of the page
 
+Quote Post
Lebon14
post Nov 8 2009, 05:23
Post #3


Member


Group: Members
Posts: 4
Joined: 8-November 09
Member No.: 11252
Mp3tag Version: 2.58



QUOTE (KCE @ Oct 24 2008, 17:08) *
Really simple but this will remove any parenthesis and its contents in any part of the string

Example:
Blah (blah1) (blah 2)
Result:
Blah

Regular expression: \(.+?\)

Replace matches with:


Thank you so much for this! You saved me a LOT of time! biggrin.gif
Go to the top of the page
 
+Quote Post

Posts in this topic
- Florian   Regular Expressions   Oct 16 2003, 19:47
- - Florian   Re: Regular Expressions   Oct 16 2003, 19:52
- - areve   Re: Regular Expressions   Oct 16 2003, 20:42
|- - gingernob   QUOTE (areve @ Oct 16 2003, 21:42) Regula...   Jun 19 2011, 18:06
- - areve   Here is another one. I don't think it will be ...   Dec 4 2003, 20:05
- - phoenixdarkdirk   This regular expression fixes tracknumbers from iT...   Apr 11 2004, 20:50
- - areve   Another one, that switches first and last names (f...   May 30 2004, 21:20
|- - incifinci   Switches first and last names QUOTE (areve ...   Feb 19 2010, 10:24
- - mll   Used to use this basic regexp : Applied on TRACK,...   Jul 14 2004, 10:27
- - ThurstonX   If you have a filename:01 Tracknameand want it to ...   Jul 31 2004, 23:34
- - RevRagnarok   I've noticed a lot of these RegExs 'go ove...   Nov 18 2004, 12:23
|- - Florian   RevRagnarok, QUOTE (RevRagnarok @ Nov 18 200...   Nov 18 2004, 14:34
|- - nickless   This RegEx will convert abbreviations composed of ...   Mar 29 2005, 22:22
- - ThurstonX   Title Tag Conversion This 2-step action does: 1....   Oct 15 2005, 02:01
- - dano   Upper case for Roman numbers Regular expression: ...   Dec 28 2005, 16:12
- - Snykch   Convert artist names in the form 'Artist, The...   Feb 19 2006, 15:35
- - Michaelm   And the other way around Move "The " to...   Apr 22 2006, 13:56
- - Fan o blues   It's taken me far too long to figure it out bu...   Mar 25 2007, 20:05
|- - Craig   QUOTE (Fan o blues @ Mar 25 2007, 19:05) ...   Mar 14 2009, 14:59
- - neilpa   This regex can remove/replace all but the last dot...   Nov 20 2007, 07:16
- - Nathan   I recently converted all my wma files to mp3 only ...   Jan 22 2008, 01:13
- - Harakiri   Another member helped me creating one of the most ...   Sep 1 2008, 23:02
- - KCE   Really simple but this will remove any parenthesis...   Oct 24 2008, 23:08
|- - Lebon14   QUOTE (KCE @ Oct 24 2008, 17:08) Really s...   Nov 8 2009, 05:23
- - captainmidnight   I dislike it when a leading zero appears in the tr...   Dec 5 2008, 04:56
|- - captainmidnight   Actually, here is a single regex that does everyth...   Dec 5 2008, 05:17
- - Florian   I've split some off-topic posts to Problem wit...   Nov 8 2009, 20:43
- - MatthiasM   This is not a regular expression for mp3tag, but a...   Nov 19 2009, 10:48
- - Zoofield   These are my Reg-Expressions there may be duplicat...   Jun 27 2010, 19:34
- - d003232   My title and/or filename looks like: Gospel&s...   Aug 16 2010, 11:38
|- - DetlevD   QUOTE (d003232 @ Aug 16 2010, 12:38) ...G...   Aug 16 2010, 17:22
|- - RevRagnarok   QUOTE (d003232 @ Aug 16 2010, 06:38) I do...   Aug 17 2010, 13:57
- - DetlevD   Roman numerals in uppercase This "Regular Ex...   Aug 31 2010, 10:33
- - DetlevD   Splitting an "Upper Camel Case" string ...   Sep 17 2010, 18:02
- - InspectorMustache   QUOTE (nickless @ Mar 29 2005, 22:22) Thi...   Dec 6 2010, 01:09
- - Juozas V   Script to fix capitalization according to English ...   Dec 15 2010, 02:39
|- - Doug Mackie   To Juozas V: Thank you very much for this. It doe...   Jan 13 2011, 19:55
- - DetlevD   Regular Expression Tutorial Beginner or Professio...   Jan 10 2011, 19:09
|- - pone   ZITAT(DetlevD @ Jan 10 2011, 19:09) Regul...   Jan 10 2011, 21:02
|- - DetlevD   QUOTE (pone @ Jan 10 2011, 21:02) Are all...   Jan 10 2011, 21:09
- - LosMintos   Convert MP3tag's date to ISO date Converts (e...   Apr 18 2011, 20:55
- - Zoofield   I could not get, "DetlevD - Splitting an Uppe...   Jun 10 2011, 22:17
- - tobi06   To remove any website in the filename example: ...   Jun 18 2011, 11:01
- - dano   I've added an example without dash to that pos...   Jun 19 2011, 20:14
|- - gingernob   QUOTE (dano @ Jun 19 2011, 21:14) I'v...   Jun 20 2011, 01:39
- - DetlevD   Convert from RFC822/1123 Date string to ISO-8601 D...   Aug 1 2011, 05:03
|- - Luctus   QUOTE (DetlevD @ Aug 1 2011, 06:03) Conve...   Mar 10 2014, 18:36
|- - DetlevD   QUOTE (Luctus @ Mar 10 2014, 18:36) Can y...   Mar 10 2014, 22:38
- - DetlevD   How to copy a list of artists and their roles ... ...   Aug 24 2011, 15:55
|- - pone   ZITAT(DetlevD @ Aug 24 2011, 16:55) ...   Aug 24 2011, 16:29
|- - DetlevD   QUOTE (pone @ Aug 24 2011, 17:29) What is...   Aug 24 2011, 16:48
- - naisanza   If you want to add TEXT to the existing tag: Regu...   Feb 8 2013, 00:55
|- - RevRagnarok   QUOTE (naisanza @ Feb 7 2013, 18:55) Regu...   Apr 5 2013, 10:41
- - dano   It's not a bug. It happens because global matc...   Apr 5 2013, 13:39


Closed 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: 2nd September 2014 - 18:04