Regular expression determines that the input is a number

clipboard.png

what is the role of value.replace (/ / g, ""). Length = = 0 ")?
can I delete it? (I deleted it and didn"t find anything wrong.)

Mar.10,2021

The main purpose of this sentence is to deal with strings that are full of spaces.
in fact, you can choose to determine whether the format is correct, so you don't have to determine whether the input is empty.
and that is, your regularity had better be changed to this

.
/^(?:[1-9]\d*|0)(?:\.\d+)?$/

the reason is that you can enter 00000000

for your rule.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9da88-1975.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9da88-1975.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?