Extract-Number-in-String
Command Description
Extracts all numbers from the target string
Command Prototype
sRet = DigitFromStr(sText)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
sText | True | string | "" | Extracted raw string |
return
sRet,The variable used to save the output of the command.
Demo
TracePrint("----------------------Extract all numbers in the target string-------- -------")
//-------------------------------------------------------------------------------
//[Remarks] Extract the numbers in the target string.
//Input parameter 1:
// sText--The extracted source string.
//out parameters:
// sRet--The variable to which the output of the function call is saved.
//
//Command prototype: sRet=DigitFromStr(sText)
//-------------------------------------------------------------------------------
sRet = DigitFromStr ("ABC123")
TracePrint (sRet)