using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"LLPart1:(.*?)LLPart2";
string input = @"BundleFormat: 1
Name: TestIllegalStringsLintalist
Description: Created just to see what strings Lintalist uses
Author: Gurlan Vasile
TitleMatch: .txt
Patterns:
- LLPart1: [[Calendar=]]
LLPart2: >>date
LLKey:
LLShorthand: >>calendar
LLScript:
- LLPart1: Syntax:
__multilinevar --> create multiline variable
Notepad++:
__lngAuto --> Notepad++ : change language to Autohotkey
AHK Studio:
__refresh --> AHK Studio : refresh project
Other:
__tgs --> any editor : paste tags template
__newcode --> any editor : create code for Lintalist to be displayed properly
__lintalist --> any editor : create code for Lintalist to be displayed properly
LLPart2:
LLKey:
LLShorthand: >>>?
LLScript:
- LLPart1: messagebox show
LLPart2:
LLKey:
LLShorthand:
LLScript: MsgBox, Test
- LLPart1: wfaw
LLPart2: fwa
LLKey:
LLShorthand:
LLScript:
- LLPart1: some code here
LLPart2: some descriptive text here
LLKey:
LLShorthand: smcd
LLScript: msgbox, HelloWorld
";
RegexOptions options = RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.Singleline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
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