mIRC Homepage

RegEx help.. Return how many numbers ?

Posted By: Adrenalin

RegEx help.. Return how many numbers ? - 20/03/04 04:32 PM

I need a Regual Expression what return how many numbers is in a string.. String can be like that: a2j5j32h56..
I try some expression.. But didn't work like i want.. Can anyone help me pls ?
Posted By: Collective

Re: RegEx help.. Return how many numbers ? - 20/03/04 04:49 PM

$count(a2j5j32h569,0,1,2,3,4,5,6,7,8,9)
or with regex:
$regex(a2j5j32h569,/\d/g)

I'm not sure which is faster.
Posted By: Online

Re: RegEx help.. Return how many numbers ? - 20/03/04 05:47 PM

$count is faster, especially when it comes to long strings.
Posted By: Adrenalin

Re: RegEx help.. Return how many numbers ? - 21/03/04 03:39 PM

DOoh.. It was easy.. Collective&Online <- Thanks for fast reply cool
© 2021 mIRC Discussion Forums