Click to See Complete Forum and Search --> : Reg Exp DW Find and Replace


jfyounce
02-11-2008, 09:15 PM
Hi all,

Can some one tell me how I can target saveFav in DW Find and Replace using a regular expression:

Here's what I have:
class="saveFav iconS"

I need to target saveFav inside the class.

I would like for it to change to:
class="iSaveFav iconS"

Thanks!

cgishack
02-11-2008, 09:41 PM
you want to replace every single one in your document?

You can find and replace like so..

var myNewString = myOldString.replace(/saveFav/g,"iSaveFav");

Declan1991
02-12-2008, 10:50 AM
you want to replace every single one in your document?
[/code]
And (document.all)?document.all:document.getElementsByTagName("*"); to get every element.