mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
Joined: Feb 2003
Posts: 10
How aobut adding support for the # wildcard for iswm statments, IE:

if (###-###-#### iswm $1) { echo Valid 10 Digit Phone Numer }
else { echo Invalid 10 Digit Phone Numbers }
instead of having to $remove the -'s, and then do
if ($len($1) == 10 && $1 isnum) { blah }

Joined: Dec 2002
Posts: 169
J
Vogon poet
Offline
Vogon poet
J
Joined: Dec 2002
Posts: 169
That might break scripts that use something like: if (*join*#nonochannel* iswm $1-)

To check for a valid phone number use $regex:
Code:
if ($regex($1,^\d{3}-\d{3}-\d{4}$)) { echo Valid 10 Digit Phone Numer }
else { echo Invalid 10 Digit Phone Numbers }


Link Copied to Clipboard