On 1/24/2005 3:03:48 PM, Dustin Frank wrote:
>I am trying to search/replace three characters within a
>repeating five line + one column block.
>[...]
>There are over 13,000 records in this file, so you can see
>why I would not want to do this by hand.
You can try it with the following RegEx-Replace:
Search string:
"\d012 X{.*}\N{.*}\N{.*}\N{.*}\N{.*}\N "
Replace string:
"1 X\1\N\2\N\3\N\4\N\5\N\d012"
But perhaps it's easier(faster?) to use a simple macro like
Begin_Of_File
repeat(ALL) {
Search("\d012 X{.*}\N{.*}\N{.*}\N{.*}\N{.*}\N ", REGEXP+NOERR+ERRBREAK)
if (! Error_Match) {
Ins_Char(49, OVERWRITE)
Line(1)
Ins_Char(3, OVERWRITE)
Line(5)
Ins_Char(12, OVERWRITE)
}
}
Christian