DriveWorks Pro 15: ExtractNumber [send feedback...]

ExtractNumber

Gets the number found in the specified value.

Syntax

ExtractNumber([Value],[Index (optional)])

Where:

Value The value to find the number in

Index (optional) Which of the numbers found to return. A negative number searches backwards (from the end of the text). Omitted returns the first number found.

Examples

RuleMeaning
ExtractNumber("MyControl2")Will extract 2 from the text MyControl2
ExtractNumber(MyName())When applied to a variable named Value2, will extract 2 from the variable name.
ExtractNumber(MyName(),2)When applied to a variable named 10Value24, will extract 24 (the 2nd number found) from the variable name.
ExtractNumber("02/28/16",-1)Will extract 16 (the first number found from the end of the text) from the variable text.

Table of Contents