I want to split a string and only return the second value to assign to a variable.
For example Mr John Doe, this should return John to be able to assign to a variable.
What would be the best way to do this.
I want to split a string and only return the second value to assign to a variable.
For example Mr John Doe, this should return John to be able to assign to a variable.
What would be the best way to do this.
OutputValue = InputString.Split(" "c)(1)
You can use .split like this, YourString.Split(" ")(1)
Hi @duaine.b
Use this below syntax:
input = "Mr John Doe"
input.Split(" ")(1)
Hope it helps!!
Regards,
Hi @duaine.b
Try this:
“Mr John Doe”.Split(" ")(1)

@duaine.b
Assign :splitArray = inputString.Split({" "}, StringSplitOptions.RemoveEmptyEntries)
Assign :secondValue = splitArray(1)
input=“Mr John Doe”
outputString=input.Split(" "c)(1)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.