Subj : console.putmsg alternative that returns a string To : Psi-Jack From : Nightfox Date : Thu Oct 02 2014 07:29 am Re: console.putmsg alternative that returns a string By: Psi-Jack to Nightfox on Thu Oct 02 2014 08:23:32 Ps>>> text = text.replace(/@([^@]+)@/g, function(m, code) { Ps>>> return bbs.atcode(code); Ps>>> }); Ps> Hmm, yeah. I don't think there's anything else. This text.replace itself Ps> goes through each beginning and ending @ code block and translates each Ps> one, at least as far as I can tell it does. the variable, text, becomes Ps> the full at-code translated result. Yep, I've used JavaScript's string replace() function in some of my scripts. And regular expressions are awesome. Nightfox --- þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com .