<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>name</key>
	<string>Regular Expression (Escaped)</string>
	<key>patterns</key>
	<array>
		<dict>
			<key>include</key>
			<string>#classes</string>
		</dict>
		<dict>
			<key>include</key>
			<string>#anchorsWithBackslash</string>
		</dict>
		<dict>
			<key>include</key>
			<string>#allEscapes</string>
		</dict>
		<dict>
			<key>include</key>
			<string>#anchors</string>
		</dict>
		<dict>
			<key>include</key>
			<string>#quantifiers</string>
		</dict>
		<dict>
			<key>include</key>
			<string>#granularQuantifier</string>
		</dict>
		<dict>
			<key>include</key>
			<string>#operators</string>
		</dict>
		<dict>
			<key>include</key>
			<string>#sets</string>
		</dict>
		<dict>
			<key>include</key>
			<string>#groups</string>
		</dict>
	</array>
	<key>repository</key>
	<dict>
		<key>allEscapes</key>
		<dict>
			<key>comment</key>
			<string>Order matters.</string>
			<key>patterns</key>
			<array>
				<dict>
					<key>include</key>
					<string>#regexpEscapeSequences</string>
				</dict>
				<dict>
					<key>include</key>
					<string>#regexpEscapedBackslash</string>
				</dict>
				<dict>
					<key>include</key>
					<string>#jsonEscapeSequences</string>
				</dict>
			</array>
		</dict>
		<key>anchors</key>
		<dict>
			<key>match</key>
			<string>[$^]</string>
			<key>name</key>
			<string>entity.other.attribute-name.anchor.escapedregexp</string>
		</dict>
		<key>anchorsWithBackslash</key>
		<dict>
			<key>match</key>
			<string>(?:\\\\[AbBZ])</string>
			<key>name</key>
			<string>entity.other.attribute-name.anchor.escapedregexp</string>
		</dict>
		<key>classes</key>
		<dict>
			<key>comment</key>
			<string>XXX: Add unicode escapes \x00 and escapes within comments.</string>
			<key>match</key>
			<string>\\\\[dDsSwW]</string>
			<key>name</key>
			<string>keyword.other.character-class.escapedregexp</string>
		</dict>
		<key>granularQuantifier</key>
		<dict>
			<key>captures</key>
			<dict>
				<key>1</key>
				<dict>
					<key>name</key>
					<string>keyword.other.punctuation.quantifier.start.escapedregexp</string>
				</dict>
				<key>2</key>
				<dict>
					<key>name</key>
					<string>constant.numeric.escapedregexp</string>
				</dict>
				<key>3</key>
				<dict>
					<key>name</key>
					<string>keyword.other.separator.escapedregexp</string>
				</dict>
				<key>4</key>
				<dict>
					<key>name</key>
					<string>constant.numeric.escapedregexp</string>
				</dict>
				<key>5</key>
				<dict>
					<key>name</key>
					<string>keyword.other.punctuation.quantifier.end.escapedregexp</string>
				</dict>
			</dict>
			<key>match</key>
			<string>(\{)([0-9]+)(,)?([0-9]+)?(\})</string>
			<key>name</key>
			<string>meta.granular.quantifier.escapedregexp</string>
		</dict>
		<key>groups</key>
		<dict>
			<key>begin</key>
			<string>\(</string>
			<key>beginCaptures</key>
			<dict>
				<key>0</key>
				<dict>
					<key>name</key>
					<string>string.regexp.group.escapedregexp</string>
				</dict>
			</dict>
			<key>comment</key>
			<string>XXX: Implement named groups, options and yes/no groups.</string>
			<key>end</key>
			<string>\)</string>
			<key>endCaptures</key>
			<dict>
				<key>0</key>
				<dict>
					<key>name</key>
					<string>string.regexp.group.escapedregexp</string>
				</dict>
			</dict>
			<key>patterns</key>
			<array>
				<dict>
					<key>match</key>
					<string>(\?(?:[:=!&gt;]|&lt;[=!]))</string>
					<key>name</key>
					<string>support.function.assertion.escapedregexp</string>
				</dict>
				<dict>
					<key>include</key>
					<string>$self</string>
				</dict>
			</array>
		</dict>
		<key>jsonEscapeSequences</key>
		<dict>
			<key>match</key>
			<string>\\[bfntr"/]</string>
			<key>name</key>
			<string>entity.other.attribute-name.escape.sequence.json.escapedregexp</string>
		</dict>
		<key>operators</key>
		<dict>
			<key>match</key>
			<string>[|.]</string>
			<key>name</key>
			<string>keyword.other.operator.escapedregexp</string>
		</dict>
		<key>quantifiers</key>
		<dict>
			<key>match</key>
			<string>(\+|\*|\?)(\?)?</string>
			<key>name</key>
			<string>keyword.other.quantifier.escapedregexp</string>
		</dict>
		<key>regexpEscapeSequences</key>
		<dict>
			<key>comment</key>
			<string>Escape next char if the slash isn't being escaped itself.</string>
			<key>match</key>
			<string>(?&lt;!\\\\)\\\\(?:[]^+?*.(){}$\[])</string>
			<key>name</key>
			<string>constant.character.escape.sequence.regexp.escapedregexp</string>
		</dict>
		<key>regexpEscapedBackslash</key>
		<dict>
			<key>match</key>
			<string>\\\\</string>
			<key>name</key>
			<string>constant.character.escape.sequence.regexp.escapedregexp</string>
		</dict>
		<key>sets</key>
		<dict>
			<key>begin</key>
			<string>(\[)(\^)?(\])?</string>
			<key>beginCaptures</key>
			<dict>
				<key>1</key>
				<dict>
					<key>name</key>
					<string>keyword.other.set.escapedregexp</string>
				</dict>
				<key>2</key>
				<dict>
					<key>name</key>
					<string>keyword.other.set.operator.negate.escapedregexp</string>
				</dict>
				<key>3</key>
				<dict>
					<key>name</key>
					<string>string.set.element.escapedregexp</string>
				</dict>
			</dict>
			<key>end</key>
			<string>]</string>
			<key>endCaptures</key>
			<dict>
				<key>0</key>
				<dict>
					<key>name</key>
					<string>keyword.other.set.escapedregexp</string>
				</dict>
			</dict>
			<key>patterns</key>
			<array>
				<dict>
					<key>captures</key>
					<dict>
						<key>1</key>
						<dict>
							<key>name</key>
							<string>keyword.operator.other.set.range.separator.escapedregexp</string>
						</dict>
					</dict>
					<key>match</key>
					<string>[A-Za-z0-9](-)[A-Za-z0-9]</string>
					<key>name</key>
					<string>support.function.set.range.escapedregexp</string>
				</dict>
				<dict>
					<key>include</key>
					<string>#regexpEscapeSequences</string>
				</dict>
				<dict>
					<key>include</key>
					<string>#classes</string>
				</dict>
				<dict>
					<key>include</key>
					<string>#jsonEscapeSequences</string>
				</dict>
				<dict>
					<key>match</key>
					<string>.*?</string>
					<key>name</key>
					<string>string.set.element.escapedregexp</string>
				</dict>
			</array>
		</dict>
	</dict>
	<key>scopeName</key>
	<string>source.escapedregexp</string>
	<key>uuid</key>
	<string>26c6799e-6824-4926-b2e5-87140300b97b</string>
</dict>
</plist>
