I want to put the result in an excel file.
This is the format. How to get the text after “/” character
I want to put the result in an excel file.
This is the format. How to get the text after “/” character
Use Regex as below
Assign a variable
StringVariable = System.Text.RegularExpressions.Regex.Match(“Row:1-2/2”,“(?<=/).+”).Value.Trim
Hope this may help you
Thanks
varStr.Split(“/”.ToCharArray)(varStr.Split(“/”.ToCharArray).Length-1)
You can use SPLIT. I will give example to you. Please try to understand the logic of SPLIT. Then it can be useful for you.
Let’s get started:
SPLIT
Spit divides the text into parts:
For: String on the part = (0): left, (1): right
For: String [.] on value of strings
Example 1
Split takes a part of text to ‘Array of strings’ - after “:” and saves it in memory of Variable type String[.]
Variable name = text
Variable type = Generic Value
New Variable name = new_text
Variable type = Array of Strings (String[.])
text = Hello:World:Its:Me
Assign:
new_text = Split(text,“:”)
Write Line:
new_text(3)
Variable ‘new_text’ contains now array of 4 strings
(0) = Hello
(1) = World
(2) = Its
(3) = Me
Result (Write Line) : Me
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.