Pattern Matching to Only First Letters of Filename

How do I set up Pattern Matching to only recognize the pattern if it occurs as the first letters of a filename? For example the filename:

abc.ralph.bill.tony.abc.txt

I want the Pattern Matching to only pick up on the instance of abc. when it occurs at the beginning of the filename. So it should only match:

abc.ralph.bill.tony.abc.txt

and not the later occurrence:

abc.ralph.bill.tony.abc.txt

Additionally the pattern should not be matched at all in the filename:

ralph.bill.tony.abc.txt

or in:

123abc.ralph.bill.tony.abc.txt

I forgot to add that I need to rename this pattern in the filename. So I want to rename abc. with 123. What would be the entire command?

Does this work for you?


Old Name: ^abc(.*)
New Name: 123\1
Type: Regular Expression

I was trying to do it command line.

Rename REGEXP PATTERN="^abc(.*)" TO "123\1"

If you just want to change a prefix from one string to another you can use a simple wildcard like abc* -> 123*

Rename PATTERN="abc*" TO="123*"

Nothing complex is needed just for that. (Regular expressions are not needed either.)

If you still don't have what you need from Blueroly's post or mine, please give some example filenames, before and after renaming, so we know the full operation you're aiming for.