In AS3 you have a function on a string with this signature:
function replace(pattern:*, repl:Object):String
The repl:Object can also specify a function. If you specify a function, the string returned by the function is inserted in place of the matching content.
Also, is it possible to get the the original string in which I want to replace things?
(In AS3 you can get the original string by
var input:String = arguments[2]; //in the callback function
)
I don't see a property in the Match
class containing the original string...