Question about regex renaming

I'm using the following bit of regex code to do some renaming:


basically I want it to strip things like




it works however there's one kink. say a file was "long_album_title_01_007.mp3" or something. this trips it up. basically if there are two numbers in a row after the first occurance it doesn't come out right. how can I make my regex code only look at the FIRST occurance of two numbers in a row?

You might give this a try:

Old name:

New name:

The first tagged expression matches anything in the file name from left to right that is not a digit or sequence of digits. The second tagged expression is the remainder of the file name.

the problem with that is that I only want it to match it when there are two (or more) digits in a row. how can I adjust the regex code you gave me do to that?

with ^([^0-9]+)(.*) I run into the following problem


turns into


when I want it to be


Ok, throw out my last offering, let's start over. As long as it's 2 or more consecutive digits you want, you can keep your expression simple like this:

Old name:

New name:

In short the above expression looks for partial file names with two or more consecutive digits and doesn't care what follows them. And when it finds a match, it uses that match as the new name which should fulfill your needs. However just for discussion purposes suppose you wanted two and only two consecutive digits, then the expression becomes more complex:

Old name:

New name:

This one requires two and only two consecutive digits together. Which can then be followed by anything else.