I am trying to find regex which would find below matches. I would replace these with blank. I am able to create regex for few of these conditions individually, but I am not able to figure out how to create one regex for all of these
Strings:
song1 artist (SiteWithMp3Keyword.com).mp3
02.song2 | siteWithdownloadKeyword.in 320 Kbps
song3 [SitewithDjKeyword.in] 128kbps.mp3
Output
song1 artist.mp3
song2
song3.mp3
Criteria for match:
- Case Insensitive
- Find Strings with particular keyword and remove whole word, even if inside any braces
- Find kpbs keyword and remove it along with any number before it (128/320)
- if string ends in .mp3, keep it as it is.
- Remove junk characters (like | ) and replace _ with space.
- Remove number if present at start of string, like 001_ 02. etc.
- Trim whitespaces before and after remaining string
Example Regex for 2.
\S (mp3|dj|download)\S

