That's strange, I copied and pasted your code into FlashDevelop and ran it
and traced out cText and it came out properly to "36000000"


Kyle McKnight
Senior UI Engineer - Accesso
602.515.1444 (M)

On Tue, Jul 25, 2017 at 10:16 AM, jfb <[email protected]> wrote:

> 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.
>

Reply via email to