Insertion or deletion backwards.

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Insertion or deletion backwards.

Postby surrvar » Tue Nov 11, 2008 4:35 pm

Is it possible to insert or delete in backward direction. eg. I want to delete the fifth character from end backwards or say two characters from position three counted from end.
surrvar
 
Posts: 2
Joined: Tue Nov 11, 2008 4:30 pm

Re: Insertion or deletion backwards.

Postby jimwillsher » Tue Nov 11, 2008 5:24 pm

Hi,

Not directly, but you could do this using a regular expression.



Jim
jimwillsher
 
Posts: 63
Joined: Wed Sep 24, 2008 1:22 pm

Re: Insertion or deletion backwards.

Postby GMA » Wed Nov 12, 2008 3:39 am

Hi, surrvar:
You can use the following expresions in the "RegEx (1)" field (I'll put a few examples of each so you can see how it works):

To delete the fifth character from the end:

MATCH: (.*)(.)(.{4})$
REPLACE: \1\3

To delete the fourth character from the end:

MATCH: (.*)(.)(.{3})$
REPLACE: \1\3

To delete the fifth and fourth characters from the end:

MATCH: (.*)(..)(.{3})$
REPLACE: \1\3

To delete the sixth, fifth and fourth characters from the end:

MATCH: (.*)(...)(.{3})$
REPLACE: \1\3

To insert something at position 4 from the end:

MATCH: (.*)(.{3})$
REPLACE: \1InsertHere\2

To insert something at position 5 from the end:

MATCH: (.*)(.{4})$
REPLACE: \1InsertHere\2

In the last two examples, of course, you have to replace "InsertHere" with whatever it is you need to insert.
Best regards,

Gabriel.
GMA
 
Posts: 91
Joined: Sun Dec 02, 2007 1:30 pm
Location: Argentina

Re: Insertion or deletion backwards.

Postby surrvar » Wed Nov 12, 2008 8:41 am

Thank you Gabriel. It worked.

I had been burning mp3s in the following format . trackno- title -time. Now many a time the track time is not in double digit eg 06-15 now this 0 before 6 is a waste of space. I had been deleting this manually as I thought it was not possible with BRU. Now this trick reduces my work tremendously.

Thanks once again.

Regards
Surrvar
surrvar
 
Posts: 2
Joined: Tue Nov 11, 2008 4:30 pm

Re: Insertion or deletion backwards.

Postby GMA » Thu Nov 13, 2008 3:39 pm

You're welcome, Surrvar; glad it was of help :)
GMA
 
Posts: 91
Joined: Sun Dec 02, 2007 1:30 pm
Location: Argentina


Return to BRU Support


cron