Extract all the text after ‘ONEONE’ and assign it to a new variable?
strVar = strData.Split({“ONEONE”}, StringSplitOptions.None).Last.toString
Extract all the text before ‘TWOTWO’ and assign it to a new variable?
strVar = strData.Split({“TWOTWO”}, StringSplitOptions.None).First.toString
Extract all the text between ‘ONEONE’ and ‘TWOTWO’ and assign it to a new variable?
strVar = strData.Split({“ONEONE”,“TWOTWO”}, StringSplitOptions.None)(1).toString
Hi @tranthao240495 I’m looking at your answer for 1 and 2; won’t 2 give the same result as 1 in taking the text after ‘TWOTWO’ rather than before ‘TWOTWO’ or am I reading that incorrectly? Just wanted to make sure it was not a typo, thanks.
Sorry, typing mistake. The right answer would be:
2. Extract all the text before ‘TWOTWO’ and assign it to a new variable?
strVar = strData.Split({“TWOTWO”}, StringSplitOptions.None).First.toString
Hey @tranthao240495 one more related question, how would I do these with the following set of text on the clipboard, similar concept just slightly different:
Extract text between the first instance of ‘ONEONE’ and the second instance of ‘TWOTWO’?
Extract the text between the second instance of ‘ONEONE’ and the second instance of ‘TWOTWO’?