ame": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-one-fregexp-expression"
				}
			]
		},
		"double-one-fregexp-lookbehind": {
			"begin": "(\\()\\?<=",
			"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
			"beginCaptures": {
				"0": {
					"name": "keyword.operator.lookbehind.regexp"
				},
				"1": {
					"name": "punctuation.parenthesis.lookbehind.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-one-fregexp-expression"
				}
			]
		},
		"double-one-fregexp-lookbehind-negative": {
			"begin": "(\\()\\?<!",
			"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
			"beginCaptures": {
				"0": {
					"name": "keyword.operator.lookbehind.negative.regexp"
				},
				"1": {
					"name": "punctuation.parenthesis.lookbehind.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-one-fregexp-expression"
				}
			]
		},
		"double-one-fregexp-conditional": {
			"begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
			"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
			"beginCaptures": {
				"0": {
					"name": "keyword.operator.conditional.regexp"
				},
				"1": {
					"name": "punctuation.parenthesis.conditional.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-one-fregexp-expression"
				}
			]
		},
		"double-one-fregexp-parentheses-non-capturing": {
			"begin": "\\(\\?:",
			"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
			"beginCaptures": {
				"0": {
					"name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-one-fregexp-expression"
				}
			]
		},
		"double-one-fregexp-parentheses": {
			"begin": "\\(",
			"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
			"beginCaptures": {
				"0": {
					"name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-one-fregexp-expression"
				}
			]
		},
		"double-three-fregexp-expression": {
			"patterns": [
				{
					"include": "#fregexp-base-expression"
				},
				{
					"include": "#double-three-regexp-character-set"
				},
				{
					"include": "#double-three-regexp-comments"
				},
				{
					"include": "#regexp-flags"
				},
				{
					"include": "#double-three-regexp-named-group"
				},
				{
					"include": "#regexp-backreference"
				},
				{
					"include": "#double-three-fregexp-lookahead"
				},
				{
					"include": "#double-three-fregexp-lookahead-negative"
				},
				{
					"include": "#double-three-fregexp-lookbehind"
				},
				{
					"include": "#double-three-fregexp-lookbehind-negative"
				},
				{
					"include": "#double-three-fregexp-conditional"
				},
				{
					"include": "#double-three-fregexp-parentheses-non-capturing"
				},
				{
					"include": "#double-three-fregexp-parentheses"
				},
				{
					"include": "#comments-string-double-three"
				}
			]
		},
		"double-three-fregexp-named-group": {
			"name": "meta.named.regexp",
			"begin": "(?x)\n  (\\()  (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
			"end": "(\\)|(?=\"\"\"))",
			"beginCaptures": {
				"1": {
					"name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
				},
				"2": {
					"name": "entity.name.tag.named.group.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-three-fregexp-expression"
				},
				{
					"include": "#comments-string-double-three"
				}
			]
		},
		"double-three-fregexp-lookahead": {
			"begin": "(\\()\\?=",
			"end": "(\\)|(?=\"\"\"))",
			"beginCaptures": {
				"0": {
					"name": "keyword.operator.lookahead.regexp"
				},
				"1": {
					"name": "punctuation.parenthesis.lookahead.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-three-fregexp-expression"
				},
				{
					"include": "#comments-string-double-three"
				}
			]
		},
		"double-three-fregexp-lookahead-negative": {
			"begin": "(\\()\\?!",
			"end": "(\\)|(?=\"\"\"))",
			"beginCaptures": {
				"0": {
					"name": "keyword.operator.lookahead.negative.regexp"
				},
				"1": {
					"name": "punctuation.parenthesis.lookahead.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-three-fregexp-expression"
				},
				{
					"include": "#comments-string-double-three"
				}
			]
		},
		"double-three-fregexp-lookbehind": {
			"begin": "(\\()\\?<=",
			"end": "(\\)|(?=\"\"\"))",
			"beginCaptures": {
				"0": {
					"name": "keyword.operator.lookbehind.regexp"
				},
				"1": {
					"name": "punctuation.parenthesis.lookbehind.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-three-fregexp-expression"
				},
				{
					"include": "#comments-string-double-three"
				}
			]
		},
		"double-three-fregexp-lookbehind-negative": {
			"begin": "(\\()\\?<!",
			"end": "(\\)|(?=\"\"\"))",
			"beginCaptures": {
				"0": {
					"name": "keyword.operator.lookbehind.negative.regexp"
				},
				"1": {
					"name": "punctuation.parenthesis.lookbehind.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-three-fregexp-expression"
				},
				{
					"include": "#comments-string-double-three"
				}
			]
		},
		"double-three-fregexp-conditional": {
			"begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
			"end": "(\\)|(?=\"\"\"))",
			"beginCaptures": {
				"0": {
					"name": "keyword.operator.conditional.regexp"
				},
				"1": {
					"name": "punctuation.parenthesis.conditional.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-three-fregexp-expression"
				},
				{
					"include": "#comments-string-double-three"
				}
			]
		},
		"double-three-fregexp-parentheses-non-capturing": {
			"begin": "\\(\\?:",
			"end": "(\\)|(?=\"\"\"))",
			"beginCaptures": {
				"0": {
					"name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-three-fregexp-expression"
				},
				{
					"include": "#comments-string-double-three"
				}
			]
		},
		"double-three-fregexp-parentheses": {
			"begin": "\\(",
			"end": "(\\)|(?=\"\"\"))",
			"beginCaptures": {
				"0": {
					"name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
				}
			},
			"endCaptures": {
				"1": {
					"name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-three-fregexp-expression"
				},
				{
					"include": "#comments-string-double-three"
				}
			]
		},
		"fregexp-single-one-line": {
			"name": "string.interpolated.python string.regexp.quoted.single.python",
			"begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\\')",
			"end": "(\\')|(?<!\\\\)(\\n)",
			"beginCaptures": {
				"2": {
					"name": "invalid.deprecated.prefix.python"
				},
				"3": {
					"name": "storage.type.string.python"
				},
				"4": {
					"name": "storage.type.string.python"
				},
				"5": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#single-one-fregexp-expression"
				}
			]
		},
		"fregexp-single-three-line": {
			"name": "string.interpolated.python string.regexp.quoted.multi.python",
			"begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\\'\\'\\')",
			"end": "(\\'\\'\\')",
			"beginCaptures": {
				"2": {
					"name": "invalid.deprecated.prefix.python"
				},
				"3": {
					"name": "storage.type.string.python"
				},
				"4": {
					"name": "storage.type.string.python"
				},
				"5": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#single-three-fregexp-expression"
				}
			]
		},
		"fregexp-double-one-line": {
			"name": "string.interpolated.python string.regexp.quoted.single.python",
			"begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\")",
			"end": "(\")|(?<!\\\\)(\\n)",
			"beginCaptures": {
				"2": {
					"name": "invalid.deprecated.prefix.python"
				},
				"3": {
					"name": "storage.type.string.python"
				},
				"4": {
					"name": "storage.type.string.python"
				},
				"5": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-one-fregexp-expression"
				}
			]
		},
		"fregexp-double-three-line": {
			"name": "string.interpolated.python string.regexp.quoted.multi.python",
			"begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\"\"\")",
			"end": "(\"\"\")",
			"beginCaptures": {
				"2": {
					"name": "invalid.deprecated.prefix.python"
				},
				"3": {
					"name": "storage.type.string.python"
				},
				"4": {
					"name": "storage.type.string.python"
				},
				"5": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#double-three-fregexp-expression"
				}
			]
		},
		"string-raw-quoted-single-line": {
			"name": "string.quoted.raw.single.python",
			"begin": "\\b(([uU]R)|(R))((['\"]))",
			"end": "(\\4)|((?<!\\\\)\\n)",
			"beginCaptures": {
				"2": {
					"name": "invalid.deprecated.prefix.python"
				},
				"3": {
					"name": "storage.type.string.python"
				},
				"4": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#string-single-bad-brace1-formatting-raw"
				},
				{
					"include": "#string-single-bad-brace2-formatting-raw"
				},
				{
					"include": "#string-raw-guts"
				}
			]
		},
		"string-bin-quoted-single-line": {
			"name": "string.quoted.binary.single.python",
			"begin": "(\\b[bB])((['\"]))",
			"end": "(\\2)|((?<!\\\\)\\n)",
			"beginCaptures": {
				"1": {
					"name": "storage.type.string.python"
				},
				"2": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#string-entity"
				}
			]
		},
		"string-raw-bin-quoted-single-line": {
			"name": "string.quoted.raw.binary.single.python",
			"begin": "(\\b(?:R[bB]|[bB]R))((['\"]))",
			"end": "(\\2)|((?<!\\\\)\\n)",
			"beginCaptures": {
				"1": {
					"name": "storage.type.string.python"
				},
				"2": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#string-raw-bin-guts"
				}
			]
		},
		"string-quoted-single-line": {
			"name": "string.quoted.single.python",
			"begin": "(?:\\b([rR])(?=[uU]))?([uU])?((['\"]))",
			"end": "(\\3)|((?<!\\\\)\\n)",
			"beginCaptures": {
				"1": {
					"name": "invalid.illegal.prefix.python"
				},
				"2": {
					"name": "storage.type.string.python"
				},
				"3": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#string-single-bad-brace1-formatting-unicode"
				},
				{
					"include": "#string-single-bad-brace2-formatting-unicode"
				},
				{
					"include": "#string-unicode-guts"
				}
			]
		},
		"string-single-bad-brace1-formatting-unicode": {
			"comment": "template using {% ... %}",
			"begin": "(?x)\n    (?= \\{%\n          ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n        %\\}\n    )\n",
			"end": "(?=(['\"])|((?<!\\\\)\\n))",
			"patterns": [
				{
					"include": "#escape-sequence-unicode"
				},
				{
					"include": "#escape-sequence"
				},
				{
					"include": "#string-line-continuation"
				}
			]
		},
		"string-single-bad-brace1-formatting-raw": {
			"comment": "template using {% ... %}",
			"begin": "(?x)\n    (?= \\{%\n          ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n        %\\}\n    )\n",
			"end": "(?=(['\"])|((?<!\\\\)\\n))",
			"patterns": [
				{
					"include": "#string-consume-escape"
				}
			]
		},
		"string-single-bad-brace2-formatting-unicode": {
			"comment": "odd format or format-like syntax",
			"begin": "(?x)\n    (?!\\{\\{)\n    (?= \\{ (\n              \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n           )\n        .*?(?!(['\"])|((?<!\\\\)\\n))\n        \\}\n    )\n",
			"end": "(?=(['\"])|((?<!\\\\)\\n))",
			"patterns": [
				{
					"include": "#escape-sequence-unicode"
				},
				{
					"include": "#string-entity"
				}
			]
		},
		"string-single-bad-brace2-formatting-raw": {
			"comment": "odd format or format-like syntax",
			"begin": "(?x)\n    (?!\\{\\{)\n    (?= \\{ (\n              \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n           )\n        .*?(?!(['\"])|((?<!\\\\)\\n))\n        \\}\n    )\n",
			"end": "(?=(['\"])|((?<!\\\\)\\n))",
			"patterns": [
				{
					"include": "#string-consume-escape"
				},
				{
					"include": "#string-formatting"
				}
			]
		},
		"string-raw-quoted-multi-line": {
			"name": "string.quoted.raw.multi.python",
			"begin": "\\b(([uU]R)|(R))('''|\"\"\")",
			"end": "(\\4)",
			"beginCaptures": {
				"2": {
					"name": "invalid.deprecated.prefix.python"
				},
				"3": {
					"name": "storage.type.string.python"
				},
				"4": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#string-multi-bad-brace1-formatting-raw"
				},
				{
					"include": "#string-multi-bad-brace2-formatting-raw"
				},
				{
					"include": "#string-raw-guts"
				}
			]
		},
		"string-bin-quoted-multi-line": {
			"name": "string.quoted.binary.multi.python",
			"begin": "(\\b[bB])('''|\"\"\")",
			"end": "(\\2)",
			"beginCaptures": {
				"1": {
					"name": "storage.type.string.python"
				},
				"2": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#string-entity"
				}
			]
		},
		"string-raw-bin-quoted-multi-line": {
			"name": "string.quoted.raw.binary.multi.python",
			"begin": "(\\b(?:R[bB]|[bB]R))('''|\"\"\")",
			"end": "(\\2)",
			"beginCaptures": {
				"1": {
					"name": "storage.type.string.python"
				},
				"2": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#string-raw-bin-guts"
				}
			]
		},
		"string-quoted-multi-line": {
			"name": "string.quoted.multi.python",
			"begin": "(?:\\b([rR])(?=[uU]))?([uU])?('''|\"\"\")",
			"end": "(\\3)",
			"beginCaptures": {
				"1": {
					"name": "invalid.illegal.prefix.python"
				},
				"2": {
					"name": "storage.type.string.python"
				},
				"3": {
					"name": "punctuation.definition.string.begin.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#string-multi-bad-brace1-formatting-unicode"
				},
				{
					"include": "#string-multi-bad-brace2-formatting-unicode"
				},
				{
					"include": "#string-unicode-guts"
				}
			]
		},
		"string-multi-bad-brace1-formatting-unicode": {
			"comment": "template using {% ... %}",
			"begin": "(?x)\n    (?= \\{%\n          ( .*? (?!'''|\"\"\") )\n        %\\}\n    )\n",
			"end": "(?='''|\"\"\")",
			"patterns": [
				{
					"include": "#escape-sequence-unicode"
				},
				{
					"include": "#escape-sequence"
				},
				{
					"include": "#string-line-continuation"
				}
			]
		},
		"string-multi-bad-brace1-formatting-raw": {
			"comment": "template using {% ... %}",
			"begin": "(?x)\n    (?= \\{%\n          ( .*? (?!'''|\"\"\") )\n        %\\}\n    )\n",
			"end": "(?='''|\"\"\")",
			"patterns": [
				{
					"include": "#string-consume-escape"
				}
			]
		},
		"string-multi-bad-brace2-formatting-unicode": {
			"comment": "odd format or format-like syntax",
			"begin": "(?x)\n    (?!\\{\\{)\n    (?= \\{ (\n              \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n           )\n        .*?(?!'''|\"\"\")\n        \\}\n    )\n",
			"end": "(?='''|\"\"\")",
			"patterns": [
				{
					"include": "#escape-sequence-unicode"
				},
				{
					"include": "#string-entity"
				}
			]
		},
		"string-multi-bad-brace2-formatting-raw": {
			"comment": "odd format or format-like syntax",
			"begin": "(?x)\n    (?!\\{\\{)\n    (?= \\{ (\n              \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n           )\n        .*?(?!'''|\"\"\")\n        \\}\n    )\n",
			"end": "(?='''|\"\"\")",
			"patterns": [
				{
					"include": "#string-consume-escape"
				},
				{
					"include": "#string-formatting"
				}
			]
		},
		"fstring-fnorm-quoted-single-line": {
			"name": "meta.fstring.python",
			"begin": "(\\b[fF])([bBuU])?((['\"]))",
			"end": "(\\3)|((?<!\\\\)\\n)",
			"beginCaptures": {
				"1": {
					"name": "string.interpolated.python string.quoted.single.python storage.type.string.python"
				},
				"2": {
					"name": "invalid.illegal.prefix.python"
				},
				"3": {
					"name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.single.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#fstring-guts"
				},
				{
					"include": "#fstring-illegal-single-brace"
				},
				{
					"include": "#fstring-single-brace"
				},
				{
					"include": "#fstring-single-core"
				}
			]
		},
		"fstring-normf-quoted-single-line": {
			"name": "meta.fstring.python",
			"begin": "(\\b[bBuU])([fF])((['\"]))",
			"end": "(\\3)|((?<!\\\\)\\n)",
			"beginCaptures": {
				"1": {
					"name": "invalid.illegal.prefix.python"
				},
				"2": {
					"name": "string.interpolated.python string.quoted.single.python storage.type.string.python"
				},
				"3": {
					"name": "punctuation.definition.string.begin.python string.quoted.single.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#fstring-guts"
				},
				{
					"include": "#fstring-illegal-single-brace"
				},
				{
					"include": "#fstring-single-brace"
				},
				{
					"include": "#fstring-single-core"
				}
			]
		},
		"fstring-raw-quoted-single-line": {
			"name": "meta.fstring.python",
			"begin": "(\\b(?:[R][fF]|[fF][R]))((['\"]))",
			"end": "(\\2)|((?<!\\\\)\\n)",
			"beginCaptures": {
				"1": {
					"name": "string.interpolated.python string.quoted.raw.single.python storage.type.string.python"
				},
				"2": {
					"name": "punctuation.definition.string.begin.python string.quoted.raw.single.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.single.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#fstring-raw-guts"
				},
				{
					"include": "#fstring-illegal-single-brace"
				},
				{
					"include": "#fstring-single-brace"
				},
				{
					"include": "#fstring-raw-single-core"
				}
			]
		},
		"fstring-single-core": {
			"name": "string.interpolated.python string.quoted.single.python",
			"match": "(?x)\n  (.+?)\n    (\n      (?# .* and .*? in multi-line match need special handling of\n        newlines otherwise SublimeText and Atom will match slightly\n        differently.\n\n        The guard for newlines has to be separate from the\n        lookahead because of special $ matching rule.)\n      ($\\n?)\n      |\n      (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n    )\n  (?# due to how multiline regexps are matched we need a special case\n    for matching a newline character)\n  | \\n\n"
		},
		"fstring-raw-single-core": {
			"name": "string.interpolated.python string.quoted.raw.single.python",
			"match": "(?x)\n  (.+?)\n    (\n      (?# .* and .*? in multi-line match need special handling of\n        newlines otherwise SublimeText and Atom will match slightly\n        differently.\n\n        The guard for newlines has to be separate from the\n        lookahead because of special $ matching rule.)\n      ($\\n?)\n      |\n      (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n    )\n  (?# due to how multiline regexps are matched we need a special case\n    for matching a newline character)\n  | \\n\n"
		},
		"fstring-single-brace": {
			"comment": "value interpolation using { ... }",
			"begin": "(\\{)",
			"end": "(?x)\n  (\\})|(?=\\n)\n",
			"beginCaptures": {
				"1": {
					"name": "constant.character.format.placeholder.other.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "constant.character.format.placeholder.other.python"
				}
			},
			"patterns": [
				{
					"include": "#fstring-terminator-single"
				},
				{
					"include": "#f-expression"
				}
			]
		},
		"fstring-terminator-single": {
			"patterns": [
				{
					"name": "storage.type.format.python",
					"match": "(![rsa])(?=})"
				},
				{
					"match": "(?x)\n  (![rsa])?\n    ( : \\w? [<>=^]? [-+ ]? \\#?\n      \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n",
					"captures": {
						"1": {
							"name": "storage.type.format.python"
						},
						"2": {
							"name": "storage.type.format.python"
						}
					}
				},
				{
					"include": "#fstring-terminator-single-tail"
				}
			]
		},
		"fstring-terminator-single-tail": {
			"begin": "(![rsa])?(:)(?=.*?{)",
			"end": "(?=})|(?=\\n)",
			"beginCaptures": {
				"1": {
					"name": "storage.type.format.python"
				},
				"2": {
					"name": "storage.type.format.python"
				}
			},
			"patterns": [
				{
					"include": "#fstring-illegal-single-brace"
				},
				{
					"include": "#fstring-single-brace"
				},
				{
					"name": "storage.type.format.python",
					"match": "([bcdeEfFgGnosxX%])(?=})"
				},
				{
					"name": "storage.type.format.python",
					"match": "(\\.\\d+)"
				},
				{
					"name": "storage.type.format.python",
					"match": "(,)"
				},
				{
					"name": "storage.type.format.python",
					"match": "(\\d+)"
				},
				{
					"name": "storage.type.format.python",
					"match": "(\\#)"
				},
				{
					"name": "storage.type.format.python",
					"match": "([-+ ])"
				},
				{
					"name": "storage.type.format.python",
					"match": "([<>=^])"
				},
				{
					"name": "storage.type.format.python",
					"match": "(\\w)"
				}
			]
		},
		"fstring-fnorm-quoted-multi-line": {
			"name": "meta.fstring.python",
			"begin": "(\\b[fF])([bBuU])?('''|\"\"\")",
			"end": "(\\3)",
			"beginCaptures": {
				"1": {
					"name": "string.interpolated.python string.quoted.multi.python storage.type.string.python"
				},
				"2": {
					"name": "invalid.illegal.prefix.python"
				},
				"3": {
					"name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#fstring-guts"
				},
				{
					"include": "#fstring-illegal-multi-brace"
				},
				{
					"include": "#fstring-multi-brace"
				},
				{
					"include": "#fstring-multi-core"
				}
			]
		},
		"fstring-normf-quoted-multi-line": {
			"name": "meta.fstring.python",
			"begin": "(\\b[bBuU])([fF])('''|\"\"\")",
			"end": "(\\3)",
			"beginCaptures": {
				"1": {
					"name": "invalid.illegal.prefix.python"
				},
				"2": {
					"name": "string.interpolated.python string.quoted.multi.python storage.type.string.python"
				},
				"3": {
					"name": "punctuation.definition.string.begin.python string.quoted.multi.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#fstring-guts"
				},
				{
					"include": "#fstring-illegal-multi-brace"
				},
				{
					"include": "#fstring-multi-brace"
				},
				{
					"include": "#fstring-multi-core"
				}
			]
		},
		"fstring-raw-quoted-multi-line": {
			"name": "meta.fstring.python",
			"begin": "(\\b(?:[R][fF]|[fF][R]))('''|\"\"\")",
			"end": "(\\2)",
			"beginCaptures": {
				"1": {
					"name": "string.interpolated.python string.quoted.raw.multi.python storage.type.string.python"
				},
				"2": {
					"name": "punctuation.definition.string.begin.python string.quoted.raw.multi.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python"
				},
				"2": {
					"name": "invalid.illegal.newline.python"
				}
			},
			"patterns": [
				{
					"include": "#fstring-raw-guts"
				},
				{
					"include": "#fstring-illegal-multi-brace"
				},
				{
					"include": "#fstring-multi-brace"
				},
				{
					"include": "#fstring-raw-multi-core"
				}
			]
		},
		"fstring-multi-core": {
			"name": "string.interpolated.python string.quoted.multi.python",
			"match": "(?x)\n  (.+?)\n    (\n      (?# .* and .*? in multi-line match need special handling of\n        newlines otherwise SublimeText and Atom will match slightly\n        differently.\n\n        The guard for newlines has to be separate from the\n        lookahead because of special $ matching rule.)\n      ($\\n?)\n      |\n      (?=[\\\\\\}\\{]|'''|\"\"\")\n    )\n  (?# due to how multiline regexps are matched we need a special case\n    for matching a newline character)\n  | \\n\n"
		},
		"fstring-raw-multi-core": {
			"name": "string.interpolated.python string.quoted.raw.multi.python",
			"match": "(?x)\n  (.+?)\n    (\n      (?# .* and .*? in multi-line match need special handling of\n        newlines otherwise SublimeText and Atom will match slightly\n        differently.\n\n        The guard for newlines has to be separate from the\n        lookahead because of special $ matching rule.)\n      ($\\n?)\n      |\n      (?=[\\\\\\}\\{]|'''|\"\"\")\n    )\n  (?# due to how multiline regexps are matched we need a special case\n    for matching a newline character)\n  | \\n\n"
		},
		"fstring-multi-brace": {
			"comment": "value interpolation using { ... }",
			"begin": "(\\{)",
			"end": "(?x)\n  (\\})\n",
			"beginCaptures": {
				"1": {
					"name": "constant.character.format.placeholder.other.python"
				}
			},
			"endCaptures": {
				"1": {
					"name": "constant.character.format.placeholder.other.python"
				}
			},
			"patterns": [
				{
					"include": "#fstring-terminator-multi"
				},
				{
					"include": "#f-expression"
				}
			]
		},
		"fstring-terminator-multi": {
			"patterns": [
				{
					"name": "storage.type.format.python",
					"match": "(![rsa])(?=})"
				},
				{
					"match": "(?x)\n  (![rsa])?\n    ( : \\w? [<>=^]? [-+ ]? \\#?\n      \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n",
					"captures": {
						"1": {
							"name": "storage.type.format.python"
						},
						"2": {
							"name": "storage.type.format.python"
						}
					}
				},
				{
					"include": "#fstring-terminator-multi-tail"
				}
			]
		},
		"fstring-terminator-multi-tail": {
			"begin": "(![rsa])?(:)(?=.*?{)",
			"end": "(?=})",
			"beginCaptures": {
				"1": {
					"name": "storage.type.format.python"
				},
				"2": {
					"name": "storage.type.format.python"
				}
			},
			"patterns": [
				{
					"include": "#fstring-illegal-multi-brace"
				},
				{
					"include": "#fstring-multi-brace"
				},
				{
					"name": "storage.type.format.python",
					"match": "([bcdeEfFgGnosxX%])(?=})"
				},
				{
					"name": "storage.type.format.python",
					"match": "(\\.\\d+)"
				},
				{
					"name": "storage.type.format.python",
					"match": "(,)"
				},
				{
					"name": "storage.type.format.python",
					"match": "(\\d+)"
				},
				{
					"name": "storage.type.format.python",
					"match": "(\\#)"
				},
				{
					"name": "storage.type.format.python",
					"match": "([-+ ])"
				},
				{
					"name": "storage.type.format.python",
					"match": "([<>=^])"
				},
				{
					"name": "storage.type.format.python",
					"match": "(\\w)"
				}
			]
		}
	}
}