Skip to main content
2 of 2
added 772 characters in body

PowerShell, 56 bytes

Takes a single number as a string; outputs 0 for other, 3 for integer, and 4 for float

("$args"-match"^-?(0|[1-9]\d*)(\.\d+)?$")+$matches.Count

Try it online!

PowerShell (Alternate Regex), 56 bytes

("$args"-match"^-?((?!0)\d+|0)(\.\d+)?$")+$matches.Count

Try it online!