using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(.+)\/brochure\?utm_campaign=(.+)";
string substitution = @"$1/?actie=brochure&utm_campaign=$2";
string input = @"https://acties.renault.nl/modellen/captur/brochure?utm_campaign=NL-r-t-NewCar-Captur-always-on-Feb-2017&utm_medium=Programmatic_buying&utm_source=Remarketing&utm_content=IAB&CAMPAIGN=NL-r-t-NL-r-t-NewCar-Captur-always-on-Feb-2017&ORIGIN=Programmatic_buying
";
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