Can RE help me achieve ths?
Posted: Sat Oct 13, 2012 10:28 am
I have a TXT file which contains many entries like this. Note that some have 2 lines, others 3.
[LH+ZoomIn]
name=L Zin
[ReduceTo10percent]
name=Reduce to10%
[RH+ZoomIn]
name=R Zin
[34onL-Z-FlyDown]
name=34onL Z-FlyDown
text = This is 34onL-Z-FlyDown
[34CtoL]
name=34CtoL
[34CtoR]
name=34CtoR
[LineGrows-1]
name=LineGrows-1
[LineHorizRed]
name=LineHoriz Red
I want to create a new file as a result of sorting on the name but keeping the rest intact. So the above would look like this (done manually, so I may not be 100% correct about Win XP's sorting method):
[34CtoL]
name=34CtoL
[34CtoR]
name=34CtoR
[34onL-Z-FlyDown]
name=34onL Z-FlyDown
text = This is 34onL-Z-FlyDown
[LineGrows-1]
name=LineGrows-1
[LineHorizRed]
name=LineHoriz Red
[ReduceTo10percent]
name=Reduce to10%
[LH+ZoomIn]
name=L Zin
[RH+ZoomIn]
name=R Zin
Is there some clever way I can use RE to help do this in a few steps please?
--
Terry, East Grinstead, UK
[LH+ZoomIn]
name=L Zin
[ReduceTo10percent]
name=Reduce to10%
[RH+ZoomIn]
name=R Zin
[34onL-Z-FlyDown]
name=34onL Z-FlyDown
text = This is 34onL-Z-FlyDown
[34CtoL]
name=34CtoL
[34CtoR]
name=34CtoR
[LineGrows-1]
name=LineGrows-1
[LineHorizRed]
name=LineHoriz Red
I want to create a new file as a result of sorting on the name but keeping the rest intact. So the above would look like this (done manually, so I may not be 100% correct about Win XP's sorting method):
[34CtoL]
name=34CtoL
[34CtoR]
name=34CtoR
[34onL-Z-FlyDown]
name=34onL Z-FlyDown
text = This is 34onL-Z-FlyDown
[LineGrows-1]
name=LineGrows-1
[LineHorizRed]
name=LineHoriz Red
[ReduceTo10percent]
name=Reduce to10%
[LH+ZoomIn]
name=L Zin
[RH+ZoomIn]
name=R Zin
Is there some clever way I can use RE to help do this in a few steps please?
--
Terry, East Grinstead, UK