Hi,
Sorry if my question sounds dumb because it should be very easy to do but I can't find any explanation anywhere.
I have some files who are formatted this way:
All I want to do is insert a counter that goes from 1 to the number of data blocks in the file on a new line before each block.
Something like that:
Except that I can't find how to set up a basic variable and increment it. ($counter in my example of course!)
Any idea please?
PS: At the end I would like to have something like that :
Sorry if my question sounds dumb because it should be very easy to do but I can't find any explanation anywhere.
I have some files who are formatted this way:
Code: Select all
000:000
data go here
000:000
data go here
000:000
data go here
...
Something like that:
Code: Select all
$counter=1
Loop
Find RegExp "^([0-9]+:[0-9]+^)"
IfFound
Replace "$counter^p^1"
$counter++;
Else
ExitLoop
EndIf
EndLoop
Any idea please?
PS: At the end I would like to have something like that :
Code: Select all
1
000:000
data go here
2
000:000
data go here
3
000:000
data go here
...
3565
000:000
data go here