paulo, ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< > From: Amazon Paulo > > I'm having trouble with a simple function. In fact, > "replace" is not working as I thought it was going > to... It should (?) replace ALL matches in a string, > but is replacing just the first one. ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< read up on the replace() function. you're missing the global flag. without it it will only replace the first occurrence. http://developer.netscape.com/docs/manuals/js/client/jsref/string.htm#119425 8 good luck, .jeff http://evolt.org/ jeff at members.evolt.org http://members.evolt.org/jeff/