编程介的小学生
2017-09-16 14:00Floating 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.
Input
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.
Output
If the string represents a legal float number, output 'Yes' in a line. Otherwise output 'No'.
Sample Input
1.1e11
1.1e1.1
#
Sample Output
Yes
No
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- 通过ajax发布带有google recaptcha的表单
- javascript
- ajax
- forms
- jquery
- php
- 1个回答
- 验证JS中的secureimage验证码
- html
- javascript
- ajax
- jquery
- php
- 1个回答
- php验证类未正确验证
- validation
- php
- 2个回答
- 以0.1为步长验证HTML5数字输入
- html5
- validation
- floating-point
- php
- 1个回答
- Floating Number Validation
- each
- 2个回答
换一换