I have a text file with many words such as "old", I just want to replace the last 5 "old" into new words like "new", how to replace it using regular expression?
Input Sample:
1111 old old 2222 old old 3333 old old 4444 old old 5555 old old
Output Sample:
1111 old old 2222 old old 3333 old new 4444 new new 5555 new new