Posted By

godstroke on 09/30/09


Tagged

regex search replace character String regexp char


Versions (?)

String replace using regular expression


 / Published in: ActionScript 3
 

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

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

Report this snippet  

You need to login to post a comment.