I\'m trying to write a regular expression for strings that are numbers in JSON. I\'m still new to writing Regular expressions, I found a diagram of a machine for JSON numbers h
For reference, here's the "number" diagram from http://www.json.org/fatfree.html:
The regex that should match this is:
-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?