How to get the text after "/"

I want to put the result in an excel file.

This is the format. How to get the text after “/” character

1 Like


Use Regex as below


Assign a variable

StringVariable = System.Text.RegularExpressions.Regex.Match(“Row:1-2/2”,"(?<=/).+").Value.Trim

Hope this may help you


1 Like


1 Like

Hi @prititit ,

you can just use split function StrVar.Split("/"c)(1)


1 Like

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:
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
new_text = Split(text,":")
Write Line:
Variable ‘new_text’ contains now array of 4 strings
(0) = Hello
(1) = World
(2) = Its
(3) = Me
Result (Write Line) : Me

1 Like

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