Determine if a string is numeric
There is the the String.looks_like_number method, which returns true when a given strings looks like a number:
Alternatively, we can use regular expressions to determine this:
Sample:
Output:
Last updated
There is the the String.looks_like_number method, which returns true when a given strings looks like a number:
Alternatively, we can use regular expressions to determine this:
Sample:
Last updated