# Copy a Number from FILENAME (or TITLE) to TRACK

**URL:** <https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947>\
**Category:** Support\
**Created:** [December 1, 2023, 2:45pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947 "2023-12-01T14:45:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schoni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@Schoni](https://community.mp3tag.de/u/Schoni)\
**Post date:** [December 1, 2023, 2:45pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947/1 "2023-12-01T14:45:00Z")

</div>

Hello, ́  
I've searched, read here and tried around so much, but I need help.

I want to copy a certain number from FILENAME (or TITLE) to TRACK, but I just can't get it...

FILENAME(s):  
I'm a Podcast #123 (01.01.2001) - Artist  
I'm a Podcast #123 \_ sometimes with details (01.01.2001) - Artist

TITLE(s):  
I'm a Podcast #123 (01.01.2001) - Artist  
I'm a Podcast #123 / sometimes with details (01.01.2001) - Artist

Now I want to copy the number of the episode (#123, without #) to TRACK.  
If the hashtag is a bigger problem, I could remove it first and put it back in after.

I hope someone can help me with my problem.

Thank you and greetz  
Schoni

---

<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 1, 2023, 2:56pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947/2 "2023-12-01T14:56:25Z")

</div>

Try Convert\>Tag-Tag for TRACK  
Format string: `$regexp(%title%,'.*#(\d+) \(.*',$1)`

Check the preview whether it works

---

<div class="post-metadata">

**Author:** ![Schoni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@Schoni](https://community.mp3tag.de/u/Schoni)\
**Post date:** [December 1, 2023, 3:22pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947/3 "2023-12-01T15:22:44Z")

</div>

Hi ohrenkino & thanks you.

Unfortunately, the entire %title% is copied to TRACK. ☹

Greetz

---

<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 1, 2023, 3:24pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947/4 "2023-12-01T15:24:56Z")

</div>

That means that the applied pattern does not match the source.  
So please show a real title. In regular expressions every character matters.

---

<div class="post-metadata">

**Author:** ![Schoni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@Schoni](https://community.mp3tag.de/u/Schoni)\
**Post date:** [December 1, 2023, 3:43pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947/5 "2023-12-01T15:43:31Z")

</div>

Hello again,  
that's exactly why I chose the example title like the original, BUT:

I have two spaces between the number and the date, but the forum only shows one after sending.  
Now, when I adjust the title to only one space, it works.

The info will probably help you more than just posting it again with one space, hehe.

Die Info

Greetz

---

<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 1, 2023, 3:47pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947/6 "2023-12-01T15:47:32Z")

</div>

Screenshots sometimes work miracles.

Here is what I get with the example string and a slight modification:  
`$regexp('I''m a Podcast #123 (01.01.2001) - Artist','.*#(\d+)\s*\(.*',$1)`  
123

![grafik](https://community.mp3tag.de/uploads/default/original/2X/2/29fece9e77000d9083c489db27133854983a52b0.png)

---

<div class="post-metadata">

**Author:** ![Schoni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@Schoni](https://community.mp3tag.de/u/Schoni)\
**Post date:** [December 1, 2023, 4:07pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947/7 "2023-12-01T16:07:15Z")

</div>

ich red eben mal deutsch 😃

das ist aber (wie es scheint) auch nur mit einem leerzeichen zwischen #123 und (01.01.2001) bei dir.  
wenn ich ein leerzeichen lösche, ging es mit %title%, genauso wie es nun geht, wenn ich dort nicht 2 leerzeichen hätte.

VG

---

<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 1, 2023, 4:08pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947/8 "2023-12-01T16:08:49Z")

</div>

Please stay in English in the English part of the forum.

---

<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 1, 2023, 4:11pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947/9 "2023-12-01T16:11:08Z")

</div>

> [@Schoni](#):
>
> wenn ich dort nicht 2 leerzeichen hätte.

I don't think that the number of space characters is the problem:  
 ![grafik](https://community.mp3tag.de/uploads/default/original/2X/5/5802bc4a1d0ce662fe285f2c078eb0df922590d9.png)

A screenshot of the real data would help a lot.

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [December 1, 2023, 5:22pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947/10 "2023-12-01T17:22:44Z")

</div>

> [@Schoni](#):
>
> I have two spaces between the number and the date, but the forum only shows one after sending.

Mark the whole string with the 2 spaces and preformat it with `</>` or `CTRL-e` before posting to avoid that some characters get eaten by the forum software.

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [December 31, 2023, 5:23pm UTC](https://community.mp3tag.de/t/copy-a-number-from-filename-or-title-to-track/62947/11 "2023-12-31T17:23:09Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
