| Store | Cart

REGEX quirk

From: Jimmy S. Lim <onw...@singnet.com.sg>
Tue, 27 Jun 2000 08:16:50 +0800
hi perl friends,

i wanted to match 1-3 digits so i used this regex:
m/\d{1,3}/g;

it is able to capture :
3
12
123
456

and everything is well, but why does it also capture/matches things like
this?

1+2
3+1

the '+' is clearly a non-digit, how come it still matches this?

very grateful for any help!
jim

Recent Messages in this Thread
Jimmy S. Lim Jun 27, 2000 12:16 am
Joe Schell Jun 27, 2000 01:05 am
Hirosi Taguti Jun 27, 2000 01:10 am
Messages in this thread