Hi i have string "20 30 50 150" , i want to extract highest number value from string

Hi i have string “20 30 50 150” , i want to extract highest number value from string

How can i achieve this , any suggestions

@shubham2
Firstly split the string with Space and assign to array variable
strarray=strinput.split(" "c)
then use max function
strarray.max() it returnz maximum value

image

image

Hi @shubham2

Use all these expression in the Assign activity

1) inputString = "20 30 50 150"

2) numberArray = inputString.Split(" ".ToCharArray())

3) intArray = numberArray.Select(Function(x) Convert.ToInt32(x)).ToArray()

4) maxValue = intArray.Max()

Regards
Gokul

ok , but can we achive with regex

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.