Please Help How Do I Search A String for Specific Charecters vb.net - TechRepublic
Question
December 21, 2009 at 03:34 AM
zukeru

Please Help How Do I Search A String for Specific Charecters vb.net

by zukeru . Updated 16 years, 6 months ago

I am using vb.net from visual studio 2008
I need to take a string like .2503AR56Sl10000.0132 and only take specific charecters after Sl, this is a constantly changing string changes every 50ms. The length of the string is not static. It can change from being 19 charecters long to 5 charecters long. The only constant is that Sl will be in the string. I need to take Sl and the 5 charecters after it out of the string and display them as another string. Also I need it to check against if Sl has 5 charecters after it and if it doesn to do nothing. There current code i have is

if instr(returndata, “Sl”) <> 0 then
label1.text = returndata
end if

however that only returns the entire string and since the string is not static nor the size is not static, i need to know how to say to vb display the 5 charecters after Sl. I dont even want it to display Sl I want it to display the 5 charecters after.

I can’t say what this project is for do to security reasons, however i would be great if someone could help.

This discussion is locked

All Comments