Hi, For a program that I am writing, I need to validate a number passed in, in the form of a String. The rule is: Eliminate all characters other than digits (0-9) and a period (.). For example: If you pass in "2500", it should return "2500". If you pass in "2500.00", it should return "2500.00". If you pass in "2,500.00", ...
Can you tell us what you consider a toll free number in the U.S.A.? Where are you calling from? Do you need the country code prefix? do you need to dial '9' first to get an outside line? do you want to allow for the parens that often go around the area code? What makes a number toll free? From where ...
I would like to validate numbers using regex, and thought that a search both here on the net would produce what I was looking for, but... The closest I can get to a number validation sequence (thankyou www.interviewjava.com) was the following: "^[-+]?[0-9]* .?[0-9]+$" but unfortunately it is incomplete. The explanation of the code is as follows: * ^[-+]? : Starts with ...