This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Please be careful about spellings: it's not "wud" but "would".
Joined: Dec 25, 2009
Apologies for the short words . Thanks for bringing to attention . Corrected the same with a strike through.
I am new to replying posts in Javaranch. Till date was only reading it. Thought of putting some time to help other to the way I can. Will take care going forward about spellings
Joined: Oct 13, 2005
Joined: Aug 03, 2008
well praveen, i got the answer for the same long back. In s.matches("\\d(\\.)") the regex expression applies to the entire string, i mean if the string was str = 2. or 654. then this expression would have worked out.But for a string like 2.34 the correct regex would be "\\d\\.\\d+" now it will work.