flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfb <j.ballada...@verizon.net>
Subject Reg Exp help
Date Tue, 25 Jul 2017 14:16:21 GMT
Hi All,
I am trying to replace all commas with nothing from a string.
var cText:String = "36,000,000";
var regEx:RegExp = /,/g;
cText = cText.replace(regEx,"");

The result for cText is 36000,000.
It is only replacing the first comma. Why the global (g) option is not
working?
Thanks !



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Reg-Exp-help-tp15486.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Mime
View raw message