Dreamweaver mx Search and Replace Blues....aaaargh

  brianatpcadvisor 18:21 12 Jan 2004

New Year resolution this year is to standardize copyright messages over about 45 sites.
I've put em all inside one folder locally and created a site in Dreamweaver so I could use 'find and replace'.
Trouble is the text string isn't the same in the different sites, and some pages are different within the various sites.
Some say Copyright - 2001; 2002; 2003; - all rights reserved - etc. etc; some say Copyright© 2003, all rights reserved; and so on.
What I want to do is to say something like: find >*copyright* so that anywhere a string with the word copyright appears between an ending and starting > it will be deleted and replaced with what I want to put in.

Can anyone help, or can't it be done?

Many thanks.

  Forum Editor 21:47 12 Jan 2004

will search (and therefore find and replace) in all documents - HTML and text in the current web. Therefore, if you've dumped all the other sites into one web, and you have that web open in D/W you'll be able to do a complete find and replace. At least I see no reason why not.

I'll be interested to hear how you get on.

  tomleady 09:52 13 Jan 2004

if you have designed your sites using templates, then you can change it in the template, and all pages linked to that template will change.

how did you use 'find and replace' on all your sites? when i have my site map open, i cant select the 'find an replace' option.


  newuserbrian 11:10 13 Jan 2004

Hi Folks.
Thanks for all this.
Perhaps I haven't explained properly.

The 45 sites are all completely different and I've just created 1 'Dreamweaver site' to contain them temporarily and try to do this.

I haven't used templates on any of them.

I can't do a simple search/find and replace 'cos of the following problem.

Every string which contains the word 'copyright' (which I want to change) is possibly different.
Some strings have something before the word copyright, others have something after the word.
In either case the words before and after may be different.

The only thing we can be sure of is that there is an HTML tag before any of the strings start, and another when they end.

Although these html tags may be different we can deduce that the string we want to change will start with the last bit of the previous tag > and end with the beginning of the next tag <

In other words, every string will start with > and end with<
This gives us a constant to work from.

So, what I want to do is to is, (if it was an old dos command), find


and replace it with what I want to say.
>copyright 2002; 2003; 2004; blah, blah<

Thanks again and I hope I've made myself clear. Sorry if not.

Try 'edit' > 'find and replace' > and the window should appear.
You can choose whether to 'find and replace' in the source code as well as the copy, and you can 'find and replace' throughout the complete site or just the page you're on.

  fraserwoohoo 12:27 15 Jan 2004

You need to use Regular Expressions in your Find and Replace - there is some good info in the help file but you probably want to do something like

Edit > Find and replace, make sure you check the Regular Expressions box.

Search for [Source Code]

Replace with
> Copyright 2002,2003,2004 <

Hope that works....


  dreambrian 13:30 15 Jan 2004

Brilliant Fraser. Exactly what I wanted.
Never heard of the term 'regular expressions' b4.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5T review: Hands-on

Illustrator Andrés Lozano on his improv line work, brazen use of colours & hand sketching

iPhone X review

Comment envoyer gratuitement des gros fichiers ?