# Regular Expressions

**URL:** <https://community.mp3tag.de/t/regular-expressions/521>\
**Category:** Howto\
**Created:** [October 16, 2003, 4:47pm UTC](https://community.mp3tag.de/t/regular-expressions/521 "2003-10-16T16:47:29Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![phoenixdarkdirk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/e274bd/32.png) [@phoenixdarkdirk](https://community.mp3tag.de/u/phoenixdarkdirk)\
**Post date:** [April 11, 2004, 5:50pm UTC](https://community.mp3tag.de/t/regular-expressions/521/5 "2004-04-11T17:50:59Z")

</div>

This regular expression fixes tracknumbers from iTunes in the [track]/[numtracks] format (like 3/12).

**Regex:**

```
^(\d+)/\d+

```

**Replace with:**

```
$1

```

This can be applied to every file and it will only correct ones that have the / in them. Good luck!

_According to RevRagnarok's suggestions below, I've made the expression less greedy._

---

_[View the full topic](https://community.mp3tag.de/t/regular-expressions/521)._
