Answers for "c# regular expression get text between 2 strings"

C#
1

get text between two strings c#

public string Between(string STR , string FirstString, string LastString)
    {       
        string FinalString;     
        int Pos1 = STR.IndexOf(FirstString) + FirstString.Length;
        int Pos2 = STR.IndexOf(LastString);
        FinalString = STR.Substring(Pos1, Pos2 - Pos1);
        return FinalString;
    }
Posted by: Guest on August-25-2021

Code answers related to "c# regular expression get text between 2 strings"

C# Answers by Framework

Browse Popular Code Answers by Language