Exercise: Match numbers with regex - video
Exercise number
Write a function that given a string it return true if the string is a number. As there might be several definitions of what is the number create several solutions one for each definition:
- Non negative integer.
- Integer. (Will you also allow + in front of the number or only - ?
- Real number. (Do you allow .3 ? What about 2. ?
- In scientific notation. (something like this: 2.123e4 )
Published on 2015-07-19
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.
Comment on this post