![]() The ^ and $ anchor to the start and end basically saying that the whole string must match the pattern A digit in the range 1-9 followed by zero or more other digits then optionally followed by a decimal point followed by at least 1 digit: ^\d*(\.\d )?$ To allow numbers with an optional decimal point followed by digits. A digit in the range 1-9 followed by zero or more other digits: ^\d*$
0 Comments
Leave a Reply. |