you mean like: 'fabio'.replace(/(fa)/g, '$1a'); // return "faabio"
-- Fábio Miranda Costa Solucione Sistemas Engenheiro de interfaces On Thu, Mar 11, 2010 at 4:36 PM, Eneko Alonso <[email protected]>wrote: > This is not Mootools related, but Mootols uses a lot of regex, so I wonder > if you guys know how to do preg_replace in javascript, this is, using > matched results in the replacement string. > From what I know, string.replace can do regex for matching, but not for > replacing, thus, the replace string has to be static. > > Any ideas? > > Thanks a lot. >
