More > JRiver Media Center 27 for Windows

Removing "Junk" from Lyrics after Lookup Lyrics

<< < (2/4) > >>

zybex:
You can use
=regex([lyrics],/#(.+?)<span#/,1)

mvandyke:

--- Quote from: zybex on June 14, 2021, 02:59:06 am ---You can use
=regex([lyrics],/#(.+?)<span#/,1)

--- End quote ---

I copied that expression to a new expression field and I could not get it to work.  I tried a couple of adjustments but REGEX has always been a challenge for me.

There is always a space after <span and I tried /s but could not get it to work.

Here is a typical section of good Lyrics and then <span "Junk"

Well, you tell me men don't have much intuition
Is that what you really thinking girl
Or are you wishing
Before you wreck your old home
And search for another new
Dadgummit
Who is he, and what is he to you
Dadgummit
Who is he, and what is he to you
Dadgummit
Who is he, and what is he to you
Dadgummit
Who is he, and what is he to you
<span jsname="Bil8Ae" class="xTFaxe z1asCe SaPW2b" style="height:18px;line-height:18px;width:18px"><svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg>
<span jsname="Bil8Ae" class="xTFaxe z1asCe SaPW2b" style="height:18px;line-height:18px;width:18px"><svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg>
<span jsname="Bil8Ae" class="xTFaxe z1asCe SaPW2b" style="height:18px;line-height:18px;width:18px"><svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg>
<span jsname="Bil8Ae" class="xTFaxe z1asCe SaPW2b" style="height:18px;line-height:18px;width:18px"><svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg>
<span jsname="Bil8Ae" class="xTFaxe z1asCe SaPW2b" style="height:18px;line-height:18px;width:18px"><svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg>

Dawgincontrol:
Simplest and easiest way.

Go to "Tag".  Scroll down under "Advanced>Lyrics.  Click on the Lyric box and edit what you don't want out.  You can also fix incorrect lyrics in this manner. 

It will also let you edit in a pop-up window if you want.

Matt:
MC28 will try to correct the issue you found.  Thank you.

SkGe:
@ Matt
Can I add some notes about this and maybe insert a request for a way to fix some issue with fields which are large format. Ex. Comment and lyrics. I am using an program to import lyrics inside MC, when this program find the lyrics it will add to MC. As of that sometimes the lyrics have additional information which I'm trying to figure out a way to remove it. I find a way in MC to do this but I have to use multiple expression to help me removing those unnecessary text but is not quite the ideal. The other way which is tedious, is to do it manually which takes time and I will try to avoid that.
I have this example:
https://regex101.com/r/Nh4GGJ/2
Where I can use this regex method to find the text which I desire to remove but to use this in MC is not quite possible.
If I want to use it I make this expression =regex([lyrics],/#.?\[.+\]#/,0) where it tell that a lyrics has or not those texts.
How can a regex help, is a way that regex to have a replace method where he can look on the field and then remove the desire information.
regexreplace() where default 0 is to look on the first line and 1 to look on multiple lines. Change with desired information.
regexremove() the same above, with only difference is to remove the unnecessary text.
I'm not so experience with regex method and if someone has a better solution to help or to share a view jump in this chat.
Thanks

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version