On 4/14/2008 9:57:03 PM, Ian Binnie wrote:
>On 4/14/2008 7:09:17 PM, Al Fairweather
>wrote:
>>Got a file full of lines like
>>this (all on one
>>line)
>"Herrn","Max","Musterman
>>n","avec la
>>Floozie","ImageWorks","Dream
>>On
>>2","Wellville","94000","NOWHER
>>E"
>
>I need to merge the 8th
>>(zip) and 9th (town field with
>>four space
>>between
>
>"Herrn","Max","Muster
>>mann","avec la
>>Floozie","ImageWorks","Dream
>>On 2","Wellville","94000
>>NOWHERE"
>
>The zip codes will
>>all start '94'
>
>An edit with
>>^{.*94[0-9][0-9][0-9]}{","} in
>>the search field
>and \1
>><-four spaces in the replace
>>with Regexp max ticked works
>>nicely.
>
>Why does replace in a
>>macro fail with MISSING LABEL:
>>}:
>
>We can't help with a macro when you
>don't tell us what is in it.
I'd assumed that you could work out from the above what I'd used.
replace("^{.*94[0-9][0-9][0-9]}{","}","\1 ",REGEXP)
>
>PS You should use '(' ')' rather than
>'{' '}'
Ah, my VEDIT three point something roots showing.
>
>Try:-
>Replace('^(.*94[0-9][0-9][0-9])","','\1
>',BEGIN|MAX|REGEXP|NOERR)
I'm afraid your suggestion didn't produce, I'll clarify that, it produced no error message, no cursor movement and certainly no desired result.
>It is a good idea to put the following
>at the start of a macro to avoid
>problems with line wrapping:-
>Config( D_DSP_WRAP, 0,LOCAL ) // Needed
>to capture end of long lines
Yes, I'd added that too, just in case.
I even paid my fifty bucks and upgraded to 6.11 (from 6.04) and didn't get anywhere.
I should add that the problem is now somewhat academic since I used a competing European product which I learned enough to solve the automation problem in a fraction of the time I've spent p****ing about with VEDIT.
My twenty year or so faith in VEDIT being the shiny tool in my tool-box of text problem solvers has however been seriously dented.
fw
|
|