using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"Name:\s*(.*?)(<br>|\R)|Language:\s*(.*?)(<br>|\R)|Email:\s*(.*?)(<br>|\R)|Country:\s*(.*?)(<br>|\R)|cellNumber:\s*(.*?)(<br>|\R)|carBrand:\s*(.*?)(<br>|\R)|carModel:\s*(.*?)(<br>|\R)|carFuel:\s*(.*?)(<br>|\R)|carStatus:\s*(.*?)(<br>|\R)|carGear:\s*(.*?)(<br>|\R)|kmPassed:\s*(.*?)(<br>|\R)|productionYear:\s*(.*?)(<br>|\R)|carType:\s*(.*?)(<br>|\R)|Message:\s*(.*?)(\R)";
string substitution = @"";
string input = @"> Name: نادر
> Email: NADERFHRAN@GMAIL.COM
> Language: ar
> Country: المملكة
> cellNumber: 0966532450848
> carBrand: mercedes-benz
> carModel: C-Series|C300
> carFuel: gasoline
> carStatus: brand-new
> carGear: automatic
> kmPassed: 0
> productionYear: 2017
> carType: smallCar
> Message: اللون الاسود او الابيض ويفضل موديل 2016 او 2017 ";
Regex regex = new Regex(pattern);
string result = regex.Replace(input, substitution);
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx