bb1832j
6 years agoOccasional Contributor
Regular Expressions in JavaScript not working
Hello,
I am trying to use the native Regular Expression with Javascript to find a particlar TextNode in a SVG object. I have been trying the following code, but still do not get a matching result:...
- 6 years ago
You could add an additional clause to the if to check is a number. Use isNaN (https://www.w3schools.com/jsref/jsref_isnan.asp)and, if it returns false, then it's a numeric value.