/ Published in: ActionScript 3
. must be escaped using \ . It means something in regexp
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var pat1:RegExp = /\./gi; var s:String = "12.345.67.89"; trace(s.replace(pat1,",")) //12,345,67,89