Topic: Search And Replace Limits (1 of 8), Read 268 times
Conf: Search and Replace
From: Deleted User
Date: Saturday, September 11, 1999 02:07 PM

Hi Everyone!

Please help me out if you can:

VEDIT's search / replace function is limited to 260 (i guess) characters. Well, now my question is the following: it's impossible to search / replace longer document parts?

I have a very long KEYWORD META TAG (10-12 lines). I want to replace this with a shorter one... is it possible somehow?

Thanks!

 


Topic: Search And Replace Limits (2 of 8), Read 265 times
Conf: Search and Replace
From: Scott Lambert
Date: Sunday, September 12, 1999 10:29 AM

On 09/11/1999 2:07:22 PM, Tamas Geschitz wrote:

>VEDIT's search / replace
>function is limited to 260 (i
>guess) characters.

>I have a very long KEYWORD
>META TAG (10-12 lines). I want
>to replace this with a shorter
>one... is it possible somehow?

I assume you are trying to type the meta tag into the search/replace dialog box. I also assume you have multiple documents and wnat to use wildfile to do the grunt work.

The way I would try first is same the long meta tag as a text file such as oldtext.txt and the new tag as a text file called newtext.txt.

Then I would try a macro much like the following :

repeat(all){
reg_load(1,"oldtext.txt")
reg_load(2,"newtext.txt")
replace(@1,@2,noerr)
if(return_value==0) {return}
}

you will need a chdir() statement at the beginning to change to the folder containing the html files and the two text files created above.

Test the macro on one file to check for errors, then try the macro with wildfile.

Hope that will help.

Regards,

Scott Lambert
http://www.pinc.com/~slambert

 


Topic: Search And Replace Limits (3 of 8), Read 214 times
Conf: Search and Replace
From: Peter Rejto
Date: Wednesday, April 12, 2000 06:28 PM

Scott,
I like your idea of putting the strings in text files.
Now I would like to generalize your macro to the case of multiple strings. Is this possible?
Actually, I have an old shareware standalone program which does this. I have a hunch that your Scribe macro is a sophisticated sear and replace macro. So you must have an insight into such search and replace problems.
Thanks and looking forward to hearing your reactions.

-peter.

 


Topic: Search And Replace Limits (4 of 8), Read 212 times
Conf: Search and Replace
From: Scott Lambert
Date: Friday, April 14, 2000 09:59 AM

On 4/12/00 6:28:00 PM, Peter Rejto wrote:
>Scott,
>I like your idea of putting
>the strings in text files.
>Now I would like to generalize
>your macro to the case of
>multiple strings. Is this
>possible?

Sure anything is possible given enough time, money, and diskspace.

So long as the number of strings is kept to a reasonable number, say about 10 search strings, and 10 replacement strings. And of course ensure your each of your strings can always fit into a text register.

Of course you would have to setup the text files manually, and in the worst case that is twenty files.

Scott

 


Topic: Search And Replace Limits (5 of 8), Read 212 times
Conf: Search and Replace
From: Peter Rejto
Date: Sunday, April 16, 2000 05:02 AM

Thanks Scott,
Now I would like to ask a less ambitious question. Specifically, could you adapt your idea of putting the search/replacement strings into a text file for the case of the WILDFILE.VDM macro. May be nothing is simple about this macro?
Looking forward to hearing your reactions.
-peter.

 


Topic: Search And Replace Limits (6 of 8), Read 219 times
Conf: Search and Replace
From: Scott Lambert
Date: Sunday, April 16, 2000 03:59 PM

On 4/16/00 5:02:00 AM, Peter Rejto wrote:
>Specifically, could you adapt
>your idea of putting the
>search/replacement strings
>into a text file for the case
>of the WILDFILE.VDM macro.

I created Changer.vdm, and you can find it in the Macro Library on my site at http://www.pinc.com/~slambert

It allows you to perform multiple search and replace operations on multiple files.

It doesn't need wildfile, it is a stand alone macro based on the multiple file processing macro in the Code Center.
(really speeds up development time having prefab code around.)

Scott

 


Topic: Thanks and a question. (7 of 8), Read 213 times
Conf: Search and Replace
From: Peter Rejto
Date: Tuesday, June 27, 2000 06:11 PM

Scott,
First and foremost thanks for CHANGER.VDM. I started to use it and I like it.

Second, a question: Do I understand it correctly? CHANGER.VDM is based on a code in your Code Center. This is the code which allows it to act on multiple files.

My more specific question is this: Can I use your code to let my
--
Replace("ss","rs")
--
command act on multiple files?

Thanks again,

-peter.

 


Topic: Thanks and a question. (8 of 8), Read 220 times
Conf: Search and Replace
From: Scott Lambert
Date: Wednesday, June 28, 2000 10:49 AM

On 6/27/00 6:11:00 PM, Peter Rejto wrote:
>Scott,
>First and foremost thanks for
>CHANGER.VDM. I started to use
>it and I like it.

You are welcomed. Glad you find it useful.

>Second, a question: Do I
>understand it correctly?
>CHANGER.VDM is based on a code
>in your Code Center. This is
>the code which allows it to
>act on multiple files.

Yes and yes.

>My more specific question is
>this: Can I use your code to
>let my
>--
>Replace("ss","rs")
>--
>command act on multiple files?

Yes, the full path of the filename to be processed is in t-reg 22, so you just write your code in the user code section of the macro. Very simply, it might go like this :

Buf_empty(ok)
file_open(@22)
(your replace command(s) here)
file_save(nomsg)

That is it. Most of the grunt work is already done by the template code.

Scott