Parse Number

Block Group: Number Formatting
Icon: Parse Number block icon

The Parse Number block returns the first number that it can parse from a string. If the input string contains more than one numeric value, only the first value is extracted. If the input string does not contain any valid numeric values, a NaN error is returned.


Input/Output Property

The following property of the Parse Number block can take input and give output.


Output Property

The following property of the Parse Number block can give output but cannot take input.


Examples

The following image shows two examples of the Parse Number block. The topmost Parse Number block extracts only the number from a string that also includes a unit label. The bottommost Parse Number block extracts the first number from a text string that includes multiple numbers.

Parse Number block examples