|
Here is a simple code function in C# .net asp .net to find string between two strings.
Response.Write(FindString("Hello World This is a Test","Hello","Test"));
public String FindString(String str, String strStart, String strEnd)
{
if (str.Contains(strStart))
{
int iStart = str.IndexOf(strStart) + strStart.Length;
int iEnd = str.IndexOf(strEnd, iStart);
return str.Substring(iStart, (iEnd - iStart));
}
return "False";
}
Use online converter to convert the code into VB .NET .
|