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

**URL:** https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441
**Category:** Support
**Created:** [December 19, 2022, 5:12am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441 "2022-12-19T05:12:24Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Fratter](https://community.mp3tag.de/user_avatar/community.mp3tag.de/fratter/32/12815_2.png) [@Fratter](https://community.mp3tag.de/u/Fratter)
#### Post date: [December 19, 2022, 5:12am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/1 "2022-12-19T05:12:24Z")

</div>

Some of my lyrics have Chinese language on every other line.

[00.12.34]Message in a bottle  
[01.23.45]收到我的漂流瓶  
[02.34.56]Message in a bottle  
[03.45.67]收到我的漂流瓶  
etc.

I've searched as much as I can but can't find a way to remove the Chinese lines with regex.

And also, if it can't be done in one go with an Action, a way to filter to find all the tracks with Chinese characters so I know which ones need fixing?

Many thanks.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [December 19, 2022, 7:33am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/2 "2022-12-19T07:33:56Z")

</div>

Do you ask this same question [elsewhere](https://community.mp3tag.de/t/please-help-with-a-regex-filter/59439/3) too?  
Just to save the time to search for and post a solution...

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 19, 2022, 8:00am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/3 "2022-12-19T08:00:09Z")

</div>

Here is a thread that deals with a filter for non-ASCII characters ..

> [@Regular expression to filter path names with diacritics](https://community.mp3tag.de/t/regular-expression-to-filter-path-names-with-diacritics/12909):
>
> Some software (in my case I'm thinking of MusicIP) cannot handle file and path names that contain diacritical marks (accents, umlauts, etc.: e.g., é, â, ü, ñ). But you may already have a lot of such paths in your music folders. Here is a filter that will find all these files: NOT %\_path% MATCHES ^[a-zA-Z0-9\W\_]\*$

And here is one to split text:

> [@Splitting a title with mixed English and non-English](https://community.mp3tag.de/t/splitting-a-title-with-mixed-english-and-non-english/49284/2):
>
> Will it always be two different scripts, not just languages? Can the English part contain diacritic marks like accents and umlauts?

---

<div class="post-metadata">

### Author: ![Fratter](https://community.mp3tag.de/user_avatar/community.mp3tag.de/fratter/32/12815_2.png) [@Fratter](https://community.mp3tag.de/u/Fratter)
#### Post date: [December 19, 2022, 8:07am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/4 "2022-12-19T08:07:25Z")

</div>

> Do you ask this same question [elsewhere](https://community.mp3tag.de/t/please-help-with-a-regex-filter/59439/3) too?  
> Just to save the time to search for and post a solution...

I don't quite understand.

I don't have a solution to the Chinese characters conundrum.

In that other thread you kindly helped me find the 3 decimal places files, and I'd found another way so I took the time to spell it out in case it would be useful for anyone else searching in the future.

Then I posted this thread about a separate question.

Then I linked to this thread to you, and you only, just because were were already communicating and you seemed very knowledgable about regex.

I _really_ want to find out how to get rid of the Chinese lines in all my lyrics, but I've searched high and low and cannot find a way. Hence this thread. I only mentioned it to you in in the other thread as I was already writing a post to thank you and just thought I'd add that in.

Anyway, this is why. This is [what I see on my phone's music player]

 ![grafik](https://community.mp3tag.de/uploads/default/original/2X/1/1bbe7e1e10aca0f5ca4d41a17faea59e14ff828e.jpeg)

Can anyone help me on this please? I'll be so grateful.

---

<div class="post-metadata">

### Author: ![Fratter](https://community.mp3tag.de/user_avatar/community.mp3tag.de/fratter/32/12815_2.png) [@Fratter](https://community.mp3tag.de/u/Fratter)
#### Post date: [December 20, 2022, 6:50am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/5 "2022-12-20T06:50:11Z")

</div>

This is absolutely wonderful. Thank you so much, ohrenkino.

Another kind person had already helped me remove the \<\> karaoke lyrics and to change lyrics with timestamp seconds from 3 decimal places to 2.

So now I have [this wonderful Action group](https://i.imgur.com/bjoKnPm.png).

You've made me very happy.

A couple of things ...

> [Regular expression to filter path names with diacritics](https://community.mp3tag.de/t/regular-expression-to-filter-path-names-with-diacritics/12909)

That's not finding Chinese characters for me.

When I entered `NOT %_path% MATCHES ^[a-zA-Z0-9\W_]*$` the filter worked fine, picking up Motörhead etc.

But when I replaced %\_path% with %lyrics%, the filter only found 4 tracks (out of hundreds).

It would be handy to be able to search for Chinese characters, if by any chance you have another solution. But given I'll be running that Mp3tag Action group on all my new lyrics, I don't think I actually need it, so don't worry if it's not straightforward.

I also searched for the most common Chinese characters and after filtering by 的, I found a whole bunch. From there I realised that there were a ton of tracks with

作词 which apparently means lyricist  
作曲 composer and  
制作人 producer

hence the Replace actions in my screenshot above.

I'd also like to put `[lyrics not found]` into the %unsyncedlyrics% field of some tracks but I couldn't find a way to do it.

I can put in `lyrics not found`, just not with the brackets. Any ideas please?

[This is what I'm using](https://i.imgur.com/yj4okhD.png), with the Format string as: `%unsyncedlyrics%lyrics not found`

I've tried a few things ...

`%unsyncedlyrics%[lyrics not found]` returns `blank`  
`%unsyncedlyrics%"[lyrics not found]"` returns `""`  
`%unsyncedlyrics%"["lyrics not found"]"` returns `""`

Perhaps you could teach me what I'm doing wrong?

Anyway, thanks a million again. I really appreciate it.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 20, 2022, 6:56am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/6 "2022-12-20T06:56:28Z")

</div>

> [@Fratter](#):
>
> I'd also like to put `[lyrics not found]` into the %unsyncedlyrics% field of some tracks

If you don't do it directly with the help of the extended tags dialogue or the tag panel but with an action, then please note that the square brackets serve a special purpose for conditional output. Use a e.g such a  
Format string: `'['lyrics not found']'`

See the documenation on Format strings:

> **[Format Strings and Placeholders – Mp3tag Documentation](https://docs.mp3tag.de/format/)**
>
> Documentation on format strings and placeholders to describe the structure of file names and imported data. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

### Author: ![Fratter](https://community.mp3tag.de/user_avatar/community.mp3tag.de/fratter/32/12815_2.png) [@Fratter](https://community.mp3tag.de/u/Fratter)
#### Post date: [December 20, 2022, 8:23am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/7 "2022-12-20T08:23:59Z")

</div>

Ah, single quote instead of double.

I should've looked at the documentation. Thanks for the link.

---

<div class="post-metadata">

### Author: ![Fratter](https://community.mp3tag.de/user_avatar/community.mp3tag.de/fratter/32/12815_2.png) [@Fratter](https://community.mp3tag.de/u/Fratter)
#### Post date: [December 20, 2022, 9:18am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/8 "2022-12-20T09:18:15Z")

</div>

Oh, and any idea what I'm doing wrong with

`NOT %unsyncedlyrics% HAS ^[a-zA-Z0-9\W_]*$`

Actually, it's odd because `NOT %_path% HAS ^[a-zA-Z0-9\W_]*$` and `NOT %artist% HAS ^[a-zA-Z0-9\W_]*$` work fine, but the lyrics searches just return ALL files, whether there's anything in the lyrics field or not.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 20, 2022, 9:24am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/9 "2022-12-20T09:24:49Z")

</div>

It's the wrong filter keyword - to use regular expressions in a filter you need MATCHES instead of HAS

Please also note that the beginning of a UNSYNCEDLYRICS field starts with a language token for MP3 files...

---

<div class="post-metadata">

### Author: ![Fratter](https://community.mp3tag.de/user_avatar/community.mp3tag.de/fratter/32/12815_2.png) [@Fratter](https://community.mp3tag.de/u/Fratter)
#### Post date: [December 20, 2022, 1:27pm UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/10 "2022-12-20T13:27:44Z")

</div>

> It's the wrong filter keyword - to use regular expressions in a filter you need MATCHES instead of HAS

`NOT %unsyncedlyrics% MATCHES ^[a-zA-Z0-9\W_]*$` doesn't return anything when I put a `Ñ` in one of the tracks' unsyncedlyrics field.

> Please also note that the beginning of a UNSYNCEDLYRICS field starts with a language token for MP3 files...

That would explain it returning all the tracks with unsynced lyrics, but that previous filter returned all tracks, whether there was anything in unsyncedlyrics or not. But I guess that was because I was using HAS instead of MATCHES.

But still, MATCHES isn't returning anything, so the language token isn't relevant, yet.

Do you mean that the language token means filtering for non-ascii characters in unsyncedlyrics won't work?

Oh, now I'm confused ...

If I put Ñ (and only that) into the unsyncedlyrics field, `NOT %unsyncedlyrics% MATCHES ^[a-zA-Z0-9\W_]*$` finds the track.

But if I put the Ñ into here:

```auto
eng||
[instrumentalÑ]

```

`NOT %unsyncedlyrics% MATCHES ^[a-zA-Z0-9\W_]*$` returns nothing.

---

<div class="post-metadata">

### Author: ![abelcheung](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@abelcheung](https://community.mp3tag.de/u/abelcheung)
#### Post date: [December 20, 2022, 1:28pm UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/11 "2022-12-20T13:28:25Z")

</div>

> [@Fratter](#):
>
> That's not finding Chinese characters for me.

To actually find and filter out Chinese characters in action group, you would want something else instead:

```auto
$regexp(%lyrics%,'[\x{2E80}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE10}-\x{FE1F}\x{FE30}-\x{FE6F}\x{FF00}-\x{FFEF}]',)

```

It is technically infeasible to just filter out Chinese, since CJK characters are all intermixed within different unicode ranges. The regex above also filters out most Japanese and some Korean characters. But for the intention to modify lyrics, it should work fine.

---

<div class="post-metadata">

### Author: ![Fratter](https://community.mp3tag.de/user_avatar/community.mp3tag.de/fratter/32/12815_2.png) [@Fratter](https://community.mp3tag.de/u/Fratter)
#### Post date: [December 20, 2022, 2:29pm UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/12 "2022-12-20T14:29:05Z")

</div>

Thanks again.

I can't get that to work.

Here's [a screenshot of the quick action I tried running](https://i.imgur.com/uLSEsAn.png) with the lyrics and unsyncedlyrics columns behind it so you can see what I'm trying to remove.

The first few lines of the lyrics look like this:

> 作词 : Billy Gibbons/Frank Beard/Dusty Hill  
> 作曲 : Billy Gibbons/Frank Beard/Dusty Hill  
> [Verse 1]  
> Well, I was rolling down the road  
> In some cold blue steel

and I'd like to remove the lines

> 作词 : Billy Gibbons/Frank Beard/Dusty Hill  
> 作曲 : Billy Gibbons/Frank Beard/Dusty Hill

Actually in this particular case, I'd be happy to just replace `作词 :` with `Lyrics by:` but let's pretend it's a whole line of lyrics like:

[01:02:34]作曲 作词 作曲 作词 作曲 作词 作曲 作词

As you can see in the screenshot, I tried running:

Guess values  
Source format:

```auto
$regexp(%lyrics%,'[\x{2E80}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE10}-\x{FE1F}\x{FE30}-\x{FE6F}\x{FF00}-\x{FFEF}]',)

```

Guessing pattern:  
%lyrics%===%chinese%

But nothing happens.

(I'm just using %chinese% instead of %comment% because I use the comment field.)

I thought your previous suggestion was working fine:

Guess values  
Source format:

```auto
$regexp(%lyrics%,'[^\x00-\x7F]+',)===$regexp(%lyrics%,'[\x00-\x7F]+',)

```

Guessing pattern:  
%lyrics%===%chinese%

I've run it on more than a thousand files and I can't turn back now, lol.

Is the newer version homing in on Chinese, Japanese and Korean characters more specifically (rather than just all non-ascii characters)?

I think so. Can you tell me how to run it properly please. My Guess values attempt just isn't working.

By the way, the only issue I had with the `$regexp(%lyrics%,'[^\x00-\x7F]+',)===$regexp(%lyrics%,'[\x00-\x7F]+',)` version was that it seemed to be removing the first round bracket on any line of lyrics that had round brackets. Maybe that was happening only when I ran it on lyrics that didn't have any non-ascii characters in it, not sure. But I've seen a few lyrics that now have e.g.

Tell her about it Tell her about it)  
instead of  
Tell her about it (Tell her about it)

Is that possibly due to the Guess values Source format?

The reason I'm running your original Guess values string on all tracks is just because I can't work out how to filter tracks with Chinese characters. And I'd come to the conclusion that it would leave tracks with no non-ascii characters in the lyrics untouched. Not sure again.

I'm writing too much and should probably edit this down but hopefully you see what I'm trying to do and where I'm failing.

Many thanks.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 20, 2022, 2:31pm UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/13 "2022-12-20T14:31:34Z")

</div>

> [@Fratter](#):
>
> Guess values  
> Source format:
> 
> ```auto
> $regexp(%lyrics%,'[\x{2E80}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE10}-\x{FE1F}\x{FE30}-\x{FE6F}\x{FF00}-\x{FFEF}]',)
> 
> ```
> 
> Guessing pattern:  
> %lyrics%===%chinese%

Where in the source format do you divide the supplied string with `==`?  
If those are missing, then the pattern does not match and you get no change.

---

<div class="post-metadata">

### Author: ![Fratter](https://community.mp3tag.de/user_avatar/community.mp3tag.de/fratter/32/12815_2.png) [@Fratter](https://community.mp3tag.de/u/Fratter)
#### Post date: [December 20, 2022, 2:45pm UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/14 "2022-12-20T14:45:16Z")

</div>

I'm sorry, I don't understand.

I'm just copying your suggestions without actually understanding them properly because it's all a bit over my head.

I don't really _want_ to use that %chinese% (%comment%) field or "split" the lyrics like the original poster in that other thread, it was just the only way I could think to make it work.

I simply have some lyrics where every other line is in Chinese, and I'd like to remove those.

Anyway, so I don't know what you mean by ...

> Where in the source format do you divide the supplied string with `==`?

Could you phrase it differently please?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 20, 2022, 2:54pm UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/15 "2022-12-20T14:54:50Z")

</div>

> [@Fratter](#):
>
> without actually understanding them properly

Sorry, yes, that was also my impression.

An action of the type "Guess value" works almost like the Convert\>Filename\>Tag function - only that the source is not always the filename but any string that you supply.  
And just like you have define a pattern for the filename which part of the string is meant to end up in a certain field, you have to do that also in "Guess value".  
And just like in Convert\>Filename-Tag: if the pattern does not match the string then you get no result.  
In your case you applied a pattern that had `==` as divider between the target fields - but I could not see that anywhere in the source.

As an attempt:  
Try an action of the type "Format value" for UNSYNCEDLYRICS  
Format string: `$regexp(%unsyncedlyrics%,'[\x{2E80}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE10}-\x{FE1F}\x{FE30}-\x{FE6F}\x{FF00}-\x{FFEF}]',)`

This should leave only the timing.  
You could then remove that timing pattern if it is still necessary.

---

<div class="post-metadata">

### Author: ![Fratter](https://community.mp3tag.de/user_avatar/community.mp3tag.de/fratter/32/12815_2.png) [@Fratter](https://community.mp3tag.de/u/Fratter)
#### Post date: [December 20, 2022, 4:23pm UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/16 "2022-12-20T16:23:10Z")

</div>

That nearly works.

I'd definitely like to remove the timestamps too and I can't think how to do that.

The timestamps are actually being deleted (which is what I want) except for some of the lines which are left intact with some curly quotes (sometimes one, sometimes two) or numbers. I guess that's because they aren't Chinese characters.

Is there a way around that to cover (nearly) all possibilities?

The previous method I'd been using left in the 15 and 45 lines (and their timestamps). I didn't know that until just now and that's disappointing because I think I've gone too far to go back to my backups! But what they heck, it's a big improvement on having _all_ the Chinese lines.

But the old method didn't keep the curly quotes, which is good.

My mission is to completely delete (including timestamps) any line that contains a Chinese character.

Three versions below.

1. Result of your new Format value method.
2. Original lyrics including Chinese.
3. Result of the [old method](https://i.imgur.com/yRVmnBy.png) (where I also then delete the %chinese% field in the same Action group).

Here's some of the original lyrics:

```
[00:39.30]that's just the name of the song, and that's why I called the song, Alice's Restaurant.
[00:39.30]它只是这歌的名字，这也是为什么我称这首歌为“爱丽丝的餐厅”。
[01:11.15]An' you can get anything you want at Alice's Restaurant
[01:11.15]你想要的全都有，就在爱丽丝的餐厅里。”
[02:12.30]Well we got there and there was a big sign and a chain across across the dump saying, "Closed on Thanksgiving."
[02:12.30]好吧，我们到了，发现垃圾场被链子锁着，而且有一个大大的标志，上面写着：“感恩节关门。”
[02:33.20]and off the side of the side road there was another fifteen foot cliff
[02:33.20]就在小路边上有一个15英尺高的悬崖，

```

Here's what happened with the new method:

```
[00:39.30]that's just the name of the song, and that's why I called the song, Alice's Restaurant.
[00:39.30]“”
[01:11.15]An' you can get anything you want at Alice's Restaurant
[01:11.15]”
[02:12.30]Well we got there and there was a big sign and a chain across across the dump saying, "Closed on Thanksgiving."
[02:12.30]“”
[02:33.20]and off the side of the side road there was another fifteen foot cliff
[02:33.20]15

```

Here's the result of the old Guess values method:

```
[00:39.30]that's just the name of the song, and that's why I called the song, Alice's Restaurant.
[01:11.15]An' you can get anything you want at Alice's Restaurant
[02:12.30]Well we got there and there was a big sign and a chain across across the dump saying, "Closed on Thanksgiving."
[02:33.20]15

```

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 20, 2022, 4:29pm UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/17 "2022-12-20T16:29:56Z")

</div>

> [@Fratter](#):
>
> [02:12.30]“”

Try an action of the type "Replace" for UNSYNCEDLYRICS  
Search string: `]“`  
Replace with: `]`

and a similar one with  
Search string: `]”`

And then another "Replace with regular expression"  
Search string: `\[\d\d\:\d\d\.\d\d\]`  
Replace with:  
(leave empty)

---

<div class="post-metadata">

### Author: ![Fratter](https://community.mp3tag.de/user_avatar/community.mp3tag.de/fratter/32/12815_2.png) [@Fratter](https://community.mp3tag.de/u/Fratter)
#### Post date: [December 20, 2022, 5:26pm UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/18 "2022-12-20T17:26:14Z")

</div>

Thank you again.

Some of the lines still have quotes in them, and the problem, of course, is that the Arabic numbers are there too.

At [05:01.649] he talks about "twenty seven eight-by-ten color glossy photographs", which in Chinese has "拍了27张标记着圆圈箭头的8x10彩色光面照片，" and then, after your string, becomes "278x10" on its Chinese line. There's a few things like that. There's `473758`, `W`, `~~`, and `......`

You were right, the timestamps do remain, it's just that my lyrics panel in foobar2000 doesn't show them when I select Edit lyric. My phone app **will** display them though, so I will want to get rid of all the timestamps for the, now otherwise empty, 'Chinese' lines.

Here's an example of what remains in the unsyncedlyrics field in the tags:

[05:01.649]and they took twenty seven eight-by-ten color glossy photographs with circles  
[05:01.649]278x10

**Is there a way to delete all lines that have a Chinese (or non-ascii perhaps) character in them?**  
**Is there a way to just filter/search for tracks with Chinese (or non-ascii) characters?**

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 21, 2022, 6:33am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/19 "2022-12-21T06:33:04Z")

</div>

Oh, please! Do not clot the forum with such long dumps.  
One line or perhaps 2 of those that you want to treat should be enough.

Have you tried the suggested actions to remove the otherwise empty timing?

Or see what this can do for you:  
`$regexp(%unsyncedlyrics%,'^\[.+?[\x{2E80}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE10}-\x{FE1F}\x{FE30}-\x{FE6F}\x{FF00}-\x{FFEF}](.*?)$',)`

---

<div class="post-metadata">

### Author: ![Fratter](https://community.mp3tag.de/user_avatar/community.mp3tag.de/fratter/32/12815_2.png) [@Fratter](https://community.mp3tag.de/u/Fratter)
#### Post date: [December 21, 2022, 10:03am UTC](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441/20 "2022-12-21T10:03:50Z")

</div>

Sorry, I didn't realise that that long drop of all the lyrics would be a problem. Posts amended.

Yes, I had tried to remove the lines that only have timestamps like this for example.

[00:27.558]  
[00:35.974]

The following seemingly has no effect.

"Replace with regular expression"  
Field: UNSYNCEDLYRICS  
Regular expression: [\d\d:\d\d.\d\d]  
Replace matches with: (leave empty)

And it's the same with your latest suggestion:

"Format value"  
Field: UNSYNCEDLYRICS  
Format string: $regexp(%unsyncedlyrics%,'^[.+?\x{2E80}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE10}-\x{FE1F}\x{FE30}-\x{FE6F}\x{FF00}-\x{FFEF}$',)

No effect.

The problem remains that so far we've been unable to remove:

- whole lines
- ASCII characters that are on the same line as the Chinese characters

Forgetting Chinese/non-ASCII for now, is it possible do a search-and-replace with regex to say, for example, " **Look for any line with the number 7 on it and, if you find a number 7 on a line, then delete that whole line**"?

**That's what I'm trying to do** , except with Chinese (or non-ASCII) characters instead of the number 7.

[Next page](https://community.mp3tag.de/t/regex-how-can-i-remove-lines-with-chinese-characters-from-the-lyrics-field/59441.md?page=2)
