[SVN] Language Grammar
Hans-Jörg Bibiko
bibiko at eva.mpg.de
Thu Apr 24 16:51:56 UTC 2008
On 24.04.2008, at 18:46, Teifion Jordan wrote:
> var_index = {
> name = 'variable.other.index.php';
> match = '(?x)
> \[(\$+)[a-zA-Z_\x{7f}-\x{ff}]
> [a-zA-Z0-9_\x{7f}-\x{ff}]*?\b\]';
> captures = { 1 = { name =
> 'punctuation.definition.variable.php'; }; };
> };
Try (?<=\[) and (?=\]) look behind resp. ahead
var_index = {
name = 'variable.other.index.php';
match = '(?x)
(?<=\[)(\$+)[a-zA-Z_\x{7f}-\x{ff}]
[a-zA-Z0-9_\x{7f}-\x{ff}]*?\b(?=\])';
captures = { 1 = { name =
'punctuation.definition.variable.php'; }; };
};
--Hans
More information about the textmate-dev
mailing list