using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^[^\]\n]+\]:[ \t]+";
string substitution = @"";
string input = @"Annotations of download.truelaunchbar.com
highlight [page 1]: True Launch Bar
highlight [page 8]: Creating shortcuts using Drag&Drop
highlight [page 9]: Creating plugins
highlight [page 11]: create a virtual folder, click on the “Browse…
highlight [page 12]: True Launch Bar supports all icon sizes. By default,
Highlight [133]: Click Options to select additional options for controlling which target items will be processed. To process all the files in subfolders of each target folder, mark the Search Nested Folders checkbox.
Underline [133]: You can also choose to process only text files or to process all file types. If you have graphics or other types of files in the target folders, you should restrict processing to only text files. This setting works in addition
Text [133]: testing";
RegexOptions options = RegexOptions.Multiline;
Regex regex = new Regex(pattern, options);
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