Page 1 of 1

Insertion or deletion backwards.

PostPosted: Tue Nov 11, 2008 4:35 pm
by surrvar
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.

Re: Insertion or deletion backwards.

PostPosted: Tue Nov 11, 2008 5:24 pm
by jimwillsher
Hi,

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



Jim

Re: Insertion or deletion backwards.

PostPosted: Wed Nov 12, 2008 3:39 am
by GMA
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.

Re: Insertion or deletion backwards.

PostPosted: Wed Nov 12, 2008 8:41 am
by surrvar
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

Re: Insertion or deletion backwards.

PostPosted: Thu Nov 13, 2008 3:39 pm
by GMA
You're welcome, Surrvar; glad it was of help :)