$re = '/LLPart1:(.*?)LLPart2/ims';
$str = '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
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
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 PHP, please visit: http://php.net/manual/en/ref.pcre.php