How can I use from Sample--A convert to Sample--B or Sample--C?
If there have more radom sample in one file how can i filter it?
I mean, I have to open one file and the file included more ROWS in

Sample--A
CHIP FRAME_4X,
$ (1, 4HTFRR2-0A-00, AD=0.005, SF=0.5)
ROWS 38500/76200
*!
CHIP FRAME_5X,
$ (2, 4HTFRR3-0A-00, AD=0.005, SF=1)
ROWS 15200/83400
*!
CHIP FRAME_25X,
$ (3, 4HTFRR6-0A-00, AD=0.005, SF=0.5)
ROWS 38500/76200
*!
CHIP M1_4X,
$ (1, 4HTM1R2-0A-00, AD=0.005, SF=0.8)
ROWS 11200/16200
*!
CHIP M1_5X,
$ (2, 4HTM1R3-0A-00, AD=0.005, SF=1)
ROWS 5200/3400
*!
CHIP M1_25X,
$ (3, 4HTM1R6-0A-00, AD=0.005, SF=0.5)
ROWS 3800/76200


Sample--B
CHIP FRAME_4X,
$ (1, 4HTFRR2-0A-00, AD=0.005, SF=1) #--- SF change to FRAME_5X
$ (2, 4HTFRR3-0A-00, AD=0.005, SF=1)
$ (3, 4HTFRR6-0A-00, AD=0.005, SF=1) #---SF change to FRAME_5X
ROWS 15200/83400 #----ROWS change to FRAME_5X
*!
CHIP M1_4X,
$ (1, 4HTM1R2-0A-00, AD=0.005, SF=1) #---SF change to M1_5X
$ (2, 4HTM1R3-0A-00, AD=0.005, SF=1)
$ (3, 4HTM1R6-0A-00, AD=0.005, SF=1) #---SF change to M1_5X
ROWS 5200/3400 #----ROWS change to CHIP_5X

Sample--C
CHIP FRAME_4X,
$ (1, 4HTFRR2-0A-00, AD=0.005, SF=1)
ROWS 15200/83400
*!
CHIP FRAME_5X,
$ (2, 4HTFRR3-0A-00, AD=0.005, SF=1)
ROWS 15200/83400
*!
CHIP FRAME_25X,
$ (3, 4HTFRR6-0A-00, AD=0.005, SF=1)
ROWS 15200/83400
*!
CHIP M1_4X,
$ (1, 4HTM1R2-0A-00, AD=0.005, SF=1)
ROWS 5200/3400
*!
CHIP M1_5X,
$ (2, 4HTM1R3-0A-00, AD=0.005, SF=1)
ROWS 5200/3400
*!
CHIP M1_25X,
$ (3, 4HTM1R6-0A-00, AD=0.005, SF=1)
ROWS 5200/3400

You have to explain better.
Give an correct example how it shoul look(input and output)

Eksp.
This lines in sample--a, i will have in sample--b.
Sample--b is a new file or sample--b is in same file.

Sample--A
CHIP FRAME_4X,
$ (1, 4HTFRR2-0A-00, AD=0.005, SF=0.5)
ROWS 38500/76200

Output.
Sample--B
CHIP FRAME_4X,
$ (1, 4HTFRR2-0A-00, AD=0.005, SF=1) #--- SF change to FRAME_5X
$ (2, 4HTFRR3-0A-00, AD=0.005, SF=1)
$ (3, 4HTFRR6-0A-00, AD=0.005, SF=1) #---SF change to FRAME_5X
ROWS 15200/83400 #----ROWS change to FRAME_5X
*!
CHIP M1_4X,
$ (1, 4HTM1R2-0A-00, AD=0.005, SF=1) #---SF change to M1_5X
$ (2, 4HTM1R3-0A-00, AD=0.005, SF=1)
$ (3, 4HTM1R6-0A-00, AD=0.005, SF=1) #---SF change to M1_5X
ROWS 5200/3400 #----ROWS change to CHIP_5X

CHIP FRAME_4X,
$ (1, 4HTFRR2-0A-00, AD=0.005, SF=0.5)
ROWS 38500/76200

Somthing like this where we don have to guess how you want it.

sorry, ^^
that's a example that I want

######------->Input
CHIP FRAME_4X,
$ (1, 4HTFRR2-0A-00, AD=0.005, SF=0.5)
ROWS 38500/76200
*!
CHIP FRAME_5X,
$ (2, 4HTFRR3-0A-00, AD=0.005, SF=1)
ROWS 15200/83400
*!
CHIP FRAME_25X,
$ (3, 4HTFRR6-0A-00, AD=0.005, SF=0.5)
ROWS 38500/76200
*!
CHIP M1_4X,
$ (1, 4HTM1R2-0A-00, AD=0.005, SF=0.8)
ROWS 11200/16200
*!
CHIP M1_5X,
$ (2, 4HTM1R3-0A-00, AD=0.005, SF=1)
ROWS 5200/3400
*!
CHIP M1_25X,
$ (3, 4HTM1R6-0A-00, AD=0.005, SF=0.5)
ROWS 3800/76200


#####-----OUTPUT
CHIP FRAME_4X,
$ (1, 4HTFRR2-0A-00, AD=0.005, SF=1) ###--SF changed to "CHIP M1_5X" SF
ROWS 15200/83400 ####----ROWS changed to "CHIP FRAME_5X" ROWS
*!
CHIP FRAME_5X,
$ (2, 4HTFRR3-0A-00, AD=0.005, SF=1)
ROWS 15200/83400
*!
CHIP FRAME_25X,
$ (3, 4HTFRR6-0A-00, AD=0.005, SF=1) ###--SF changed to "CHIP FRAME_5X" SF
ROWS 15200/83400 ####----ROWS changed to "CHIP FRAME_5X" ROWS
*!
CHIP M1_4X,
$ (1, 4HTM1R2-0A-00, AD=0.005, SF=1) ###--SF changed to "CHIP M1_5X" SF
ROWS 5200/3400 ####----ROWS changed to "CHIP M1_5X" ROWS
*!
CHIP M1_5X,
$ (2, 4HTM1R3-0A-00, AD=0.005, SF=1)
ROWS 5200/3400
*!
CHIP M1_25X,
$ (3, 4HTM1R6-0A-00, AD=0.005, SF=1) ###--SF changed to "CHIP M1_5X" SF
ROWS 5200/3400 ####----ROWS changed to "CHIP M1_5X" ROWS

for all "ROWS" and "SF=" of "CHIP FRAME_* and "CHIP M1_* were changed to specific ROWS as above I mentioned.
BTW, how can I use "dictionary" method to do it?

Thank you for everybody review and reply.

This article has been dead for over six months. Start a new discussion instead.