Return to Snippet

Revision: 18474
at September 30, 2009 14:44 by godstroke


Initial Code
var pat1:RegExp = /\./gi;
var s:String = "12.345.67.89";
trace(s.replace(pat1,",")) //12,345,67,89

Initial URL

                                

Initial Description
. must be escaped using \ . It  means something in regexp

Initial Title
String replace using regular expression

Initial Tags
regex, search, replace, regexp

Initial Language
ActionScript 3