Skip to content

Instantly share code, notes, and snippets.

@vyach-vasiliev
Last active March 12, 2017 09:38
Show Gist options
  • Save vyach-vasiliev/02a731bcc610383a3d143a53169048db to your computer and use it in GitHub Desktop.
Save vyach-vasiliev/02a731bcc610383a3d143a53169048db to your computer and use it in GitHub Desktop.
Rules regex-replaces for TagScanner

Rules regex-replaces in TagScanner

Download .tst file with rules

Thank you for your attention! 😊

Please write to me if you encounter a problem or wish to supplement the list! πŸ”₯

For different length dashes

[—–] -> - (simbol [minus])

For first letters in next words

Input:

  • radio edit, acoustic, radio, edit, original, remix, mix, cover

Output:

  • Radio Edit, Acoustic, Radio, Edit, Original, Remix, Mix, Cover

For Classic opus

β™― -> -sharp

β™­ -> -flat

(?!(No|Op|K))\.\s*(?=\d) -> [Nothing]

Input:

  • Frederic Chopin - Waltz No. 10 in B minor Op. 69 No. 2.mp3
  • Wolfgang Amadeus Mozart - Piano Concerto No. 27 in Bβ™­ major, K. 595

Output:

  • Frederic Chopin - Waltz No.10 in B minor Op.69 No.2.mp3
  • Wolfgang Amadeus Mozart - Piano Concerto No.27 in B-flat major, K.595

For fixing "No."

(\#|\β„–)\.*(?=\s*\d) -> No.

Input:

  • Frederic Chopin - Waltz β„–10 in B minor Op. 69 #2.mp3
  • Wolfgang Amadeus Mozart - Piano Concerto #27 in B-flat major, K.595

Output:

  • Frederic Chopin - Waltz No.10 in B minor Op. 69 No.2.mp3
  • Wolfgang Amadeus Mozart - Piano Concerto No.27 in B-flat major, K.595

For excess characters at the end string

\s\W+(?=\.\w+$) -> [Nothing]

Input:

  • Hans Zimmer - Now We Are Free (Spaarkey remix) -() ..mp3 Output:
  • Hans Zimmer - Now We Are Free (Spaarkey remix).mp3

For remove pseudo-spaces

\d*[_\+]\d*(?=\W*) -> `[Space]

Input:

  • Jennifer_Hudson_–_OST+Dream girls_-_And_I+Am+Telling+You+I'm_Not_Going
  • 03+Kim+Taylor-American+Child+1.mp3

Output:

  • Jennifer Hudson – OST Dream girls - And I Am Telling You I'm Not Going
  • 03 Kim Taylor-American Child 1.mp3

For start number of composition

^[\[\(]*\s*\d{1,}\.*\s*[\]\)]*\s* -> [Nothing]

Input:

  • 023.08Ρ…02 - Zach Braff and Donald Faison - Steak Night song.mp3
  • 023 08Ρ…02 - Zach Braff and Donald Faison - Steak Night song.mp3

Output:

  • 08Ρ…02 - Zach Braff and Donald Faison - Steak Night song.mp3
  • 08Ρ…02 - Zach Braff and Donald Faison - Steak Night song.mp3

For position number of composition

^[\[\(]*\s*\d{1,}[Ρ…x\.]\d{1,}\s*[\]\)]*\s* -> [Nothing]

Input:

  • (4x01)The Stanley Brothers – Precious Memories
  • [1x21] The Countdown Kids - My Bonnie Lies Over the Ocean
  • 1x21 The Countdown Kids - My Bonnie Lies Over the Ocean

Output:

  • The Stanley Brothers – Precious Memories
  • The Countdown Kids - My Bonnie Lies Over the Ocean
  • etc.

For OST-substring mark

\s*[\[\(]*OST.*?[\]\)]\s* -> [Nothing]

Input:

  • Jennifer Hudson – And I Am Telling You I'm Not Going (OST DreamGirls)
  • Jennifer Hudson – (OST DreamGirls) And I Am Telling You I'm Not Going
  • Jennifer Hudson – [OST DreamGirls) And I Am Telling You I'm Not Going

Output:

  • Jennifer Hudson – And I Am Telling You I'm Not Going
  • etc.

For OST-substring mark with delimeter

\s*[\[\(]*OST.*?[\]\)]*.+(?=\s+[-\.]\s*) -> [Nothing]

Input:

  • Jennifer Hudson – OST Dream girls - And I Am Telling You I'm Not Going

Output:

  • Jennifer Hudson – And I Am Telling You I'm Not Going

For artists delimiter

(?=.*)(\s*(&|\sand\s|\,|\/|\\|\|)\s*)(?=.*) -> , ([comma][space])

Input:

  • Los Lobos&A.Bandares
  • Los Lobos and A.Bandares
  • Los Lobos,A.Bandares
  • Los Lobos/A.Bandares
  • Los Lobos\A.Bandares
  • Los Lobos|A.Bandares

Output:

  • Los Lobos, A.Bandares
  • etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment