You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.
The regex written is /[0-9]+/
It would return true even if there are any other characters in the string.
If the regex is /^[0-9]+$/, it specifies there should not be any characters other than numbers.
Please look into this.
The text was updated successfully, but these errors were encountered:
/^[0-9]+$/ this will only work for numbers not floating point values. But if you want to include a decimal point in your string then you should use this regex : /^[0-9]\d*(.\d+)?$/
The regex written is /[0-9]+/
It would return true even if there are any other characters in the string.
If the regex is /^[0-9]+$/, it specifies there should not be any characters other than numbers.
Please look into this.
The text was updated successfully, but these errors were encountered: