mIRC Home    About    Download    Register    News    Help

Print Thread
HELLLO help with with regex plssssssss #61904 26/11/03 12:58 PM
Joined: Dec 2002
Posts: 60
C
coder Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
here the simpe code (im still learning regex for my future and sons)

$regex(c,[d-b])
how to make that code returning 1 WITHOUT changing [d-b]
so i want it goes like if (1 !ISNUM 2-4) { }
so far as i know,[d-b] mean d too b :
d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b so c is not include right
i hope someone help me


p/s : KINGTOMATO pls do not reply my post

Re: HELLLO help with with regex plssssssss #61905 26/11/03 09:06 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
AFAIK [d-b] is an invalid character range since the range-checking doesn't loop round to the beginning of the alphabet like that so you'll always get 0 with that expression. However, to negate a character set you would make the first character inside it a ^. So to do what you wanted you'd use the regular expression [^abd-z].


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: HELLLO help with with regex plssssssss #61906 27/11/03 05:32 AM
Joined: Dec 2002
Posts: 60
C
coder Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
thank you sooooooooo much starbuck
why i didnt think about that b4
thx