[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] S & R query



In message <5424b0b756.Alan.Adams@xxxxxxxxxxxxxxxxxxxxxx>
          Alan Adams <alan@xxxxxxxxxxxxxxxx> wrote:

> Is there a way to use Search and Replace to replace two or more lines 
> of text with one different line?
> 
> If so, can part of one of the original lines be included in the 
> replacement line?
> 
> The example I want to do is:
> 
> Original text is
> 
> K%=FNwritebuf(A$,1)
> IF K%>0 THEN PROCwarn("Could not send all data: "+STR$ K%+" bytes not 
> sent")
> 
> The replacement should be
> 
> PROCsendmessage(A$,1)
> 
> Where the A4 and 1 need to be copied from original to replacement, as 
> they could be, for example (b$,client%)

The following expressions should do the trick. The search expression may
need some work depending on the exact lines to match, I've assumed that
it always starts with "K%="

  Search: < "K%=FNwritebuf(" @1 * ")" @2 * $ * >
  Replace: "PROCsendmessage(" @12

Cheers,
Fred.

-- 
StrongED Developer
http://www.stronged.iconbar.com/

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at
http://diy.Torrens.org/RO/StrongED/index.html