[Flashcoders] (AS3) Regular Expression

2007-01-19 Thread Oliver Müller
Hi, I'm looking for a tinier and probably faster solution for my RegExp here: var pattern:RegExp = /(?!)(r+)/sg; var str:String = \rjustus\rjustus\rjustus; function myfunc() { if (arguments[3].substr((arguments[2]-1),1) != ) return br /; return ; } trace(str.replace(pattern, myfunc));

Re: [Flashcoders] (AS3) Regular Expression

2007-01-19 Thread Ray Chuan
var arr:Array = split(str, \r); arr.join(br /); On 1/19/07, Oliver Müller [EMAIL PROTECTED] wrote: Hi, I'm looking for a tinier and probably faster solution for my RegExp here: var pattern:RegExp = /(?!)(r+)/sg; var str:String = \rjustus\rjustus\rjustus; function myfunc() { if