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


In reply to Re: attempting to achieve something by LanX
in thread attempting to achieve something by scientologyboxing

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.