logo
Search
showing results for - "make valid string for eval 28 29"
Fanny
19 Mar 2016
1// strip anything other than digits, (), -+/* and .
2var str = "12/5*9+9.4*2".replace(/[^-()\d/*+.]/g, '');
3alert(eval(str)); 
source
similar questions
url validator javascripteval in javascripthow to validate a string using regular expression in javascriptcalculate string value in javascript 2c not using evalif there is an invalid expression in eval js then how to get tieval javascriptuncaught evalerror 3a refused to evaluate a string as javascript becausewhat is eval in jsemail validation in javascript using regular expressionjavascript eval 28 29 functionvalidate url in javascriptwhat is the meaning of evalvalidate url javascript
queries leading to this page
check valid evalmake valid string for eval 28 29make valid string for eval 28 29
privacy policyterms of useinstagram
Crafted with  ♥  for everyone

sign in to continue
your answer for
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
sign in to continue
ask question on maxinterview
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content
please be clear, to the point and respectful
sign in to continue