Dynamic Substring Extraction

untitled3

Actually I am trying to extract the marked value.That will be changed dynamically.How can i extract that marked place value everytime?
@vvaidya

you can achieve this by using substring method, if it is Specific length.

it will be not a specific length ,is there any chance to get it

Does it have specific place, 3-rd in your example?

yes 3rd place

Hello,

Try this,
mystring.Substring(mystring.Length - 4);

Thanks,
Meg

you can use RegEx like this in case i the string contain only digital:
image

Put it in the (.*?)Matches activity

image

See example in attachment Main.xaml (5.7 KB)

It is not working @megharajky.It is giving the value 2 as a output

If it always 3rd String , you can use YourString.Split(Convert.Tochar(" "))(2)

I am unable to open you attachment @Head

untitled4

I am getting the error which was in screenshot @Head

Hi @Subhadharan

untitled4

I am getting the 3rd place value.But it is coming with the 2 line

Hi @Head @Subhadharan @megharajky

Actually there are 2 lines,As you can see in screenshot ,I want first line’s third value as a substring.

Can you paste few inputs which you get dynamically.It looks like the initial Message box and this one are different

you can use a split using " " - space and also with string option to remove new lines and then take 3rd value from the array which is (2)

Try this
image

image

image

Hi @nadim.warsi

If u don’t mind can you share it… :slightly_smiling_face:

input.Split(Environment.NewLine.ToArray)(0).Split(" "c)(2)

1 Like

Thank you so much finally I got the output :star_struck: :star_struck: :star_struck:
Thank you everybody @nadim.warsi @head @Subhadharan @megharajky @Divyashreem

1 Like

Great! :smiley: :beers:

[Please close this thread marking appropriate answer as a solution]

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