# Parsing numbers from a string

**URL:** <https://forum.kirupa.com/t/parsing-numbers-from-a-string/285354>\
**Category:** flash\
**Created:** [March 30, 2009, 9:46pm UTC](https://forum.kirupa.com/t/parsing-numbers-from-a-string/285354 "2009-03-30T21:46:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kristopher](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kristopher/32/501_2.png) [@Kristopher](https://forum.kirupa.com/u/Kristopher)\
**Post date:** [March 30, 2009, 9:46pm UTC](https://forum.kirupa.com/t/parsing-numbers-from-a-string/285354/1 "2009-03-30T21:46:51Z")

</div>

Hello all,

I’m trying to find a way to parse out some numbers from a potential string. Basically, I’m making a financial-based calculator, and the user could input something like

$45,509.30

and I’m trying to figure out how to extract everything but the period so I’m left with

45509.30

I found this help from Senocular: [http://www.senocular.com/flash/actionscript.php?file=ActionScript\_1.0/Prototypes/String/extractNumbers.as](http://www.senocular.com/flash/actionscript.php?file=ActionScript_1.0/Prototypes/String/extractNumbers.as)

But unfortunately, it’s AS1 and I can’t get it to work with my code…

Anyways, if anyone would be willing to help out an old vet, that’d be sweet 🙂
