Skip to content

Instantly share code, notes, and snippets.

@kellpossible
Last active August 29, 2015 13:57
Show Gist options
  • Save kellpossible/9677899 to your computer and use it in GitHub Desktop.
Save kellpossible/9677899 to your computer and use it in GitHub Desktop.
A bunch of tips and tricks for doing regex matching in YAML-tmLanguage for sublime text editor
patterns:
- comment: numbers including with decimal places
name: constant.numeric.eppl
match: (?<=[^a-zA-Z0-9\.])([\-]{0,1}[\d\.]+)
- name: keyword.control.eppl
match: \b(if|else)\b
- comment: match strings
name: string.eppl
match: \"[\s\S]*?\"
- comment: match comments with { comment } format
name: comment.block.eppl
begin: (\{)
end: (\})
- comment: match functions defined using def keyword
name: entity.name.function.eppl
match: \b(?<=def)(.*)\b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment