Hi nauna,
Check this example. Now please take its reference and correct your code.
Namespaces
C#
using System.Linq;
using System.Text.RegularExpressions;
VB.Net
Imports System.Linq
Imports System.Text.RegularExpressions
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
string input = "Drink: Fanta Strawberry + 0.00 USD <br/> Side: Classic chips + 0.00 USD <br/> ";
input += "Option 1: Asian Ginger Chicken Egg Roll + 0.00 USD <br/> ";
input += "Option 2: Chipotle Chicken Egg Roll + 0.00 USD <br/> ";
input += "Option 3: V Greens and Cornbread Egg Roll + 0.00 USD <br/>";
string[] result = Regex.Matches(input, @"\:(.+?)\+").Cast<Match>().Select(s => s.Groups[1].Value.Trim()).ToArray();
Response.Write(string.Join(" ", result));
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim input As String = "Drink: Fanta Strawberry + 0.00 USD <br/> Side: Classic chips + 0.00 USD <br/> "
input += "Option 1: Asian Ginger Chicken Egg Roll + 0.00 USD <br/> "
input += "Option 2: Chipotle Chicken Egg Roll + 0.00 USD <br/> "
input += "Option 3: V Greens and Cornbread Egg Roll + 0.00 USD <br/>"
Dim result As String() = Regex.Matches(input, "\:(.+?)\+").Cast(Of Match)().Select(Function(s) s.Groups(1).Value.Trim()).ToArray()
Response.Write(String.Join(" ", result))
End Sub
Output
Fanta Strawberry Classic chips Asian Ginger Chicken Egg Roll Chipotle Chicken Egg Roll V Greens and Cornbread Egg Roll