mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2003
Posts: 413
A
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 413
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 ?

Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
$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.

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
$count is faster, especially when it comes to long strings.

Joined: Apr 2003
Posts: 413
A
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 413
DOoh.. It was easy.. Collective&Online <- Thanks for fast reply cool


Link Copied to Clipboard