mIRC Home    About    Download    Register    News    Help

Print Thread
RegEx help.. Return how many numbers ? #75931 20/03/04 04:32 PM
Joined: Apr 2003
Posts: 414
Adrenalin Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Apr 2003
Posts: 414
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 ?


mIRC Chm Help 6.16.0.3 Full Anchored!
Re: RegEx help.. Return how many numbers ? #75932 20/03/04 04:49 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
$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.

Re: RegEx help.. Return how many numbers ? #75933 20/03/04 05:47 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
$count is faster, especially when it comes to long strings.

Re: RegEx help.. Return how many numbers ? #75934 21/03/04 03:39 PM
Joined: Apr 2003
Posts: 414
Adrenalin Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Apr 2003
Posts: 414
DOoh.. It was easy.. Collective&Online <- Thanks for fast reply cool


mIRC Chm Help 6.16.0.3 Full Anchored!