[regex?] How can I remove lines with Chinese characters from the lyrics field?

If you compare


Then you many notice that the square brackets are treated differently.
Also, please compare


It would be nice if you could either copy the strings accurately by the letter or develop them on your own according to your environment.

Just a hint: you can test the scripting functions in Convert>tag-Tag and see there in the preview whether the result is as expected

It must be something to do with the forum's automatic formatting.

Here's a screenshot of me composing this reply, with my text on the left and the forum's preview on the right. You can see the difference.

I promise you I didn't type your suggestions in by hand, I merely copied and pasted.

It means, I think, that I've ben typing in the correct strings but they are getting garbled when I put them in a quote in the forum. Not sure how you're managing to keep them intact.

Anyway, regarding \[\d\d\:\d\d\.\d\d\], this has no effect and this is what I see in Convert>tag-Tag.

And with $regexp(%unsyncedlyrics%,'^\[.+?[\x{2E80}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE10}-\x{FE1F}\x{FE30}-\x{FE6F}\x{FF00}-\x{FFEF}](.*?)$',), this returns the first line of the lyrics and 207 more blank lines (ie. 208 lines - and there were 416 in the original). This is what I see in Convert>tag-Tag.

This is what the $regexp() function shows on my PC:

(Oh yes: please use the forum upload function or paste the screendumps from the clipboard into the post editor but do not use a third party site to store the pictures. This request and how to embed code parts is described in this thread:


Point taken about screenshots. Thank you.

But I'm going to leave this now because another kind, clever soul elsewhere came up with

^\[[0-9:\.]{9}\][-]?[^ -~]+([^ -~]|[0-9xW\*\.( )~,-])*+(\r\n|\n)?

which seems to work perfectly, so now I'm considering this solved (except that I just need to work out how to include all the regular ASCII characters not just x, W, ~ etc.).

I really appreciate you taking so much time to help me out.

Vielen Dank.

I tested this snipped

and it returns the input string (i.e. "

I'm horribly confused. I was so excited that it was working.

These are the last three lines (lines 413 to 415) of the UNSYNCEDLYRICS tag before running the action:


These are the last three lines (lines 207 to 209) after running the action:

[17:59.144]Da-da da-da da-da da-dum
[18:01.257]At Alice's Restaurant

It not only works well, but it gets rid of all the "15" "W" "~" etc that were left in using other methods. And it removes the whole line (including the timestamps) where there is a Chinese character. Success.

But ... when I try it on another track with Chinese lyrics, it has no effect. Why is it only working on Alice's Restaurant, I wonder?

The first three lines of the Alice's Restaurant lyrics tag are

eng||[00:00.000] 作词 : Arlo Guthrie
[00:01.000] 作曲 : Arlo Guthrie
[00:27.558]This song is called Alice's Restaurant, and it's about Alice, and the restaurant.

The first three lines of the other random track's lyrics tag are:

eng||[00:00.000] 作词 : Billy Joel
[00:01.000] 作曲 : Billy Joel
[00:15.06]Come out, Virginia. Don't let me wait.

I can't see what's making a difference?

To be clear, I've uploaded a screenshot of what I ran.


And have you tested other suggestions in this thread whether they work now?

I am pretty sure that the

will debug it for you.

I'm sure I've tried everything in this thread. I've put so much effort in and tried to be thorough.

Yes, I'm hoping for a reply from the other person. Touch wood.

What I'm thinking about now, though, is this thing of different tracks behaving differently.

I mean, when I've tried things (things suggested in this thread, for example) that haven't worked for me, it could be that if I'd tried them on a different track, they might have worked.

It's all so bewildering, lol.

But I'll have to revisit the other, older suggestions to see if they work on other tracks.

I've got some other stuff to do now, but I'll be back in touch later or tomorrow (I'm currently in east Asia).

Thank you again :pray:

I think I might have sorted it out.

That string seems to be looking for 9 characters at the start (the timestamp). Many of the lyrics (in karaoke format) have the seconds to 3 decimal places instead of 2. I think that's why it wasn't working on the other tracks I tried.

So I've moved the action that fixes the decimal place thing to the top of my action group (see attached screenshot), and it seems to work. Do you think that makes sense?

The whole action group?
Then I wonder why you delete the field "Chinese" at the end of this group. Where does it come from?

I took the screenshot before I realised that the <delete chinese> action was still there.

If you remember, the old way involved splitting the languages into two different fields.

My solution was to write the Chinese stuff to a new field I made called %chinese% (because I didn't want to use %comment%, as I use that field already) and then delete that field once it was no longer needed.

Before I read this comment of yours, I'd already deleted the "delete chinese" bit but I left it in the screenshot because it wasn't really relevant to what we'd been talking about.

It's gone now, as you'll see in this screenshot ...