Page 1 of 1

Extract only numbers from string

PostPosted: Sat Apr 06, 2013 10:12 pm
by chromebandit
Extract only the numeric characters from a string..... Vbscript

You can download if you like:
http://neoplugs.promosoft.biz/wp-content/uploads/2013/04/Extract-Numbers.zip

Regards

I use this

PostPosted: Sun Apr 07, 2013 8:28 pm
by virger
I use this, I can take one or more numbers than once

{NeoBook Function}
Version=5.70
Language=JScript
Param=[%str]|Variable|String
Param=[%ret]|Variable|Return Number(s)
{End}
nbSetVar( "[%ret]", nbGetVar("[%str]").match(/\d+/g))



=========
setvar "[Str]" "Hi 123 Friend 456 Pura 678 Vida"
Call "Str2Num" "[Str] "[Ret]"

...ret === 123,456,678
----------------------------
From Costa Rica
PURA VIDA