I know there are newer "proper" ways to do this in AS3 (StringUtils class or something) but the old AS2 way still works as well.
myString = myString.split(strToMatch).join(strToReplace); HTH, Ben --- In [email protected], "marty.pitt" <[EMAIL PROTECTED]> wrote: > > Admission of guilt: > > I don't get regular expressions. Never have, never will. I'm missing > that gene. > > But, from what I can tell, reg exp seem to be the ONLY way to do a > simple replace within in a string. What's the deal?!? > > So, I'm struggling with the String.Replace() method in AS3. > > Does anyone have a simple replace function along the lines of: > > public static function > Replace(source:String,valueToMatch:String,valueToReplace:String):String { > // > } > > Or, is there a similar function hidden somewhere within the AS3 code? > > Marty >

