Block Group: | Number Formatting |
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.
The following property of the Parse Number block can take input and give output.
The following property of the Parse Number block can give output but cannot take input.
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.