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
image

1 Like

@prititit

Use Regex as below

image

Assign a variable

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

Hope this may help you

Thanks

1 Like

varStr.Split(“/”.ToCharArray)(varStr.Split(“/”.ToCharArray).Length-1)

2 Likes

Hi @prititit ,

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

Cheers

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:
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

1 Like

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