Javascript has an overload for string.replace(...)
that takes a Regular Expression and a callback function, but I'm having a very difficult time finding ANY documentation on this specific overload!
W3Schools.com doesn't mention this overload. I've also gone through dozens of Google results, but every page talks about string.replace(string, string)
or string.replace(RegExp, string)
. It's almost embarrassing not being able to find a solid Javascript documentation reference! My Google-fu has let me down.
I am mostly interested in knowing everything about the callback function, such as input parameters and return values. I'm also interested in any possible cross-browser issues.
;)
– Šime Vidas Nov 6 '11 at 0:53