Hi all!

Went ahead and pulled together a search and replace command for the
ZAPplus module, and have a working snippet up.  Though the code was
quite straightforward the command is crazy powerful...  Check it out.

See:  http://www.fast.st/zap/pmwiki.php?n=Snippets.Replace

Basically, Replace allows you to find and replace text throughout your
entire site (or on specific pages or groups) at the click of a button.

To use it to do something like FOX, just put an invisible marker on
the target page, like [==] or whatever else you want.  Then to append,
simply replace "[==]" with "[==]New Text". Or, to prepend text,
replace "[==]" with "New Text[==]". But this is just one application
of replace. It can do quite a bit more...

For example, you could replace every instance of some text string
throughout your site with [+text string+], or change some color you
use in various pages with some other color.  Update outdated
information on your site (like a phone number) could be instantly
updated on every page it appears, or a text string could be deleted
from every page in your site.

To be honest, this command is really cool.  I don't think I can even
fully grasp what can be done with it!  And there are possibilities I
have not yet even tested (like mult-line replaces, or full pattern
matching, etc). But, the first draft of it is up.  Let me know if
anyone has questions or comments...

Cheers,
Dan

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to