Re: [Clip] Selective line merging
- --- In firstname.lastname@example.org, "John Shotsky" <jshotsky@...> wrote:
>Isn't it just a matter of replacing each CRNL with a space except before numbers from 1 through 9 ? So there would be nothing to store and repeat with back reference.
> To state the task:
> A line of nothing but numbers and spaces, followed by a line of
> characters and spaces, followed by a line of numbers which include
> at least one colon and spaces should become one line.
> ;Trim off trailing spaces
> ^!Replace "\x20+$" >> "" ARSW
> ;Merge sections
> ^!Replace "^(\d+)\R(.+)\R(\d.*:.*)$" >> "$1 $2 $3" ARSW
The only condition: No runtime >= 10 hours ;-)
^!Replace "\R(?![1-9])" >> "\x20" WARS
^!Menu Modify/Spaces/Single Space