shunfurh 于 2017.09.16 22:00 提问
- Floating Number Validation
Given a string, you should validate whether the string represents a legal float number. The legal float number should in this pattern: ^([+-])?(?\d*)?((.)(?\d*))?(([eE])(?[+-]?\d+))?$ Obviously if both fractional_digits and integral_digits part are empty, this string is also illegal.
There are multiple test cases, each with a string in a line(no extra blanks in this string). The test cases end with a single '#' in a line.
If the string represents a legal float number, output 'Yes' in a line. Otherwise output 'No'.
- caozhy 2017.09.30 21:39