{ "name": "Regular Expressions (spin)", "scopeName": "source.regexp.spin", "patterns": [ { "name": "keyword.control.anchor.regexp", "match": "\\\\[bBAZzG]|\\^|\\$" }, { "name": "keyword.other.back-reference.regexp", "match": "\\\\[1-9][0-9]?" }, { "name": "keyword.operator.quantifier.regexp", "match": "[?+*][?+]?|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" }, { "name": "keyword.operator.or.regexp", "match": "\\|" }, { "name": "comment.block.regexp", "begin": "\\(\\?\\#", "end": "\\)" }, { "name": "comment.line.number-sign.regexp", "match": "(?\u003c=^|\\s)#\\s[[a-zA-Z0-9,. \\t?!-:][^\\x{00}-\\x{7F}]]*$" }, { "name": "keyword.other.option-toggle.regexp", "match": "\\(\\?[iLmsux]+\\)" }, { "name": "keyword.other.back-reference.named.regexp", "match": "(\\()(\\?P=([a-zA-Z_][a-zA-Z_0-9]*\\w*))(\\))" }, { "name": "meta.group.assertion.regexp", "begin": "(\\()((\\?=)|(\\?!)|(\\?\u003c=)|(\\?\u003c!))", "end": "(\\))", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "punctuation.definition.group.regexp" }, "2": { "name": "punctuation.definition.group.assertion.regexp" }, "3": { "name": "meta.assertion.look-ahead.regexp" }, "4": { "name": "meta.assertion.negative-look-ahead.regexp" }, "5": { "name": "meta.assertion.look-behind.regexp" }, "6": { "name": "meta.assertion.negative-look-behind.regexp" } }, "endCaptures": { "1": { "name": "punctuation.definition.group.regexp" } } }, { "name": "meta.group.assertion.conditional.regexp", "begin": "(\\()(\\?\\(([1-9][0-9]?|[a-zA-Z_][a-zA-Z_0-9]*)\\))", "end": "(\\))", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "punctuation.definition.group.regexp" }, "2": { "name": "punctuation.definition.group.assertion.conditional.regexp" }, "3": { "name": "entity.name.section.back-reference.regexp" } } }, { "name": "meta.group.regexp", "begin": "(\\()((\\?P\u003c)([a-z]\\w*)(\u003e)|(\\?:))?", "end": "(\\))", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "punctuation.definition.group.regexp" }, "3": { "name": "punctuation.definition.group.capture.regexp" }, "4": { "name": "entity.name.section.group.regexp" }, "5": { "name": "punctuation.definition.group.capture.regexp" }, "6": { "name": "punctuation.definition.group.no-capture.regexp" } }, "endCaptures": { "1": { "name": "punctuation.definition.group.regexp" } } }, { "include": "#character-class" } ], "repository": { "character-class": { "patterns": [ { "name": "constant.character.character-class.regexp", "match": "\\\\[wWsSdDhH]|\\." }, { "name": "constant.character.escape.backslash.regexp", "match": "\\\\." }, { "name": "constant.other.character-class.set.regexp", "begin": "(\\[)(\\^)?", "end": "(\\])", "patterns": [ { "include": "#character-class" }, { "name": "constant.other.character-class.range.regexp", "match": "((\\\\.)|.)\\-((\\\\.)|[^\\]])", "captures": { "2": { "name": "constant.character.escape.backslash.regexp" }, "4": { "name": "constant.character.escape.backslash.regexp" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.character-class.regexp" }, "2": { "name": "keyword.operator.negation.regexp" } }, "endCaptures": { "1": { "name": "punctuation.definition.character-class.regexp" } } } ] } } }