Do any of the existing JavaScript frameworks have a non-regex replace() function, or has this already been posted on the web somewhere as a one-off function?
For example I want to replace '@!#$123=%' and I don’t want to worry about which characters to escape. Most languages seem to have both methods of doing replacements. I would like to see this simple thing added.
i may be misunderstanding your question, but javascript does have a
replace()edit: (see comments) the 5th edition does seem to have this info in it, although it doesn’t show up when i link directly to it. here’s the relevant part: