--- 
name: Regular Expression
fileTypes: 
- re
scopeName: source.regexp
repository: 
  escaped_char: 
    name: constant.character.escape.regexp
    match: \\.
    comment: escaped character
  character_class: 
    name: keyword.control.character-class.regexp
    match: \\[wWsSdDhH]
uuid: BAFE4C4F-8D59-48CD-A3BC-52A2084531C9
foldingStartMarker: (/\*|\{|\()
patterns: 
- name: keyword.operator.regexp
  match: \|
- name: keyword.control.anchors.regexp
  match: \\[bBAZzG^$]
- include: "#character_class"
- include: "#escaped_char"
- name: keyword.control.set.regexp
  begin: \[(?:\^?\])?
  end: \]
  patterns: 
  - include: "#character_class"
  - include: "#escaped_char"
  - name: constant.other.range.regexp
    match: .-.
  - name: keyword.operator.intersection.regexp
    match: .&&.
- name: string.regexp.group
  begin: \(
  end: \)
  patterns: 
  - include: source.regexp
  - name: constant.other.assertion.regexp
    match: (?<=\()\?(<[=!]|>|=|:|!)
  - name: comment.line.number-sign.regexp
    match: (?<=\()\?#
- name: keyword.other.backref-and-recursion.regexp
  match: \\(\n\d+|\k\w+|(?<!\|)\g\w+)
- name: constant.character.escape.regexp
  match: \\([tvnrbfae]|[0-8]{3}|x\H\H\{7\H{7}\}|x\H\H|c\d+|C-\d+|M-\d+|M-\\C-\d+)
- name: keyword.operator.quantifier.regexp
  match: ((?<!\()[?*+][?+]?)|\{\d*,\d*\}
foldingStopMarker: (\*/|\}|\))
keyEquivalent: ^~R
comment: Matches Oniguruma's Ruby regexp syntax (TextMate uses Oniguruma in Ruby mode).
