in reply to attempting to achieve something

I have no clue what your question is, and I don't wanna guess.

(something about breeding JS-monkeys with skirts?)

Maybe try providing a SSCCE, if wording and punctuation are too complicated?

update

after staring at the screen it seems like that Perl regex is translating octal code \0123 into characters and you want help translating it to JS?

I'd say have a look at the String and the RegExp objects, there you'll find .replace or .replace_all methods working like a Perl regex with /g modifier. JS copied almost all regex features available in Perl4.

update

yep off topic, but here you go

replaceAll

Hint: you'll need a replacer function for /e

update

see also

replace#using_global_and_ignore_with_replace

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery