javascript - JS - Check if string contain only 0 -


i have data of day , need check if contain 0. how can check if string contain 0? want regular expressions.

/^0*$/.test(subject) 

returns true string contains nothing (any number of, including 0) zeroes. if don't want empty string match, use + instead of *.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -