Replace the fifth character if it is a "1" on a gr

General discussions about Advanced Find and Replace
Post Reply
EduardoRGC
Posts: 1
Joined: Wed Aug 10, 2005 2:50 pm

Replace the fifth character if it is a "1" on a gr

Post by EduardoRGC »

I have some files with certein groups of numbers like "123412", "614016", etc,...

They have in common that they are groups of six numbers and the fifth character is a "1", also there are other groups of numbers that don't have the "1" as the fifth character or that don't have any particular caracteristic. And, there are a full range of ASCII chars.

What I would like to do is to replace the fifth character, if it is a number "1" on groups of 6 numbers for a "2".

Some examples:

435432 -> 435432 (Unchanged)

654636 -> 654636 (Unchanged)

123412 -> 123422

654317 -> 654327

595714 -> 595724


How can I perform that operation?

Thanks.

EDITED: Another little thing: How are String functions like Trim used?

Thanks again.

Post Reply