Folks,
I am just playing with TextMate and trying to get a better grasp of regexps.. ;)
A language grammar for some time stamped log files (like system.log)
{ scopeName = 'text.logfile'; fileTypes = ( 'log' ); foldingStartMarker = '/**|{\s*$'; foldingStopMarker = '**/|^\s*}'; patterns = ( { name = 'invalid'; match = '(crash(dump|ed)|error|failed)'; }, { name = 'constant.numeric'; match = '[0-9]'; }, { name = 'keyword.operator'; match = '((|))'; }, { name = 'string.url'; match = '\s(/.*log)'; }, { name = 'string'; begin = '^'; end = ':\s'; patterns = ( { name = 'constant.language.time-stamp'; match = '[a-zA-Z]{3}\s[0-9]+?\s[0-9]{2}:[0-9]{2}:[0-9]{2}'; }, { name = 'keyword'; match = '(launchd|authexec)'; }, { name = 'variable.other.process'; match = '\w+?[\d{1,6}]'; }, ); }, ); }