Note: forwarded message attached.


Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.
--- Begin Message ---
I am having problems with Regular Expressions usage.
I want to ensure that the user enters only digits and no other characters.
For this I am using the code below.
I create a Pattern Object to which I pass a regular _expression_ and when I call matches method I always get false. What am I doing wrong?
                       
Pattern p=Pattern.compile("\\d");
System.out.println(p.matcher("456").matches());
Thanks & Regards
 
 
 


How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.
--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to