Skip to content

Commit

Permalink
- Fix QUOTEDSTRING pattern (LOGSTASH-446)
Browse files Browse the repository at this point in the history
  In some cases, Onigiruma gets confused about negative matches, so
  previously a pattern of '%{QS} something', if false match, would
  cause Oniguruma to loop frantickly. I haven't yet dug into
  the part of Oni that does this, but it's common that some regexp
  engines have this behavior. Easy fix moving to non-backtracking
  matches..
  • Loading branch information
jordansissel committed May 13, 2012
1 parent fcdf199 commit b9c8d26
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions patterns/grok-patterns
Expand Up @@ -12,8 +12,7 @@ NOTSPACE \S+
SPACE \s*
DATA .*?
GREEDYDATA .*
#QUOTEDSTRING (?:(?<!\\)(?:"(?:\\.|[^\\"])*"|(?:'(?:\\.|[^\\'])*')|(?:`(?:\\.|[^\\`])*`)))
QUOTEDSTRING (?:(?<!\\)(?:"(?:\\.|[^\\"]+)*"|(?:'(?:\\.|[^\\']+)*')|(?:`(?:\\.|[^\\`]+)*`)))
QUOTEDSTRING (?:(?<!\\)(?:"(?>[^\\"]+|\\.)*")|(?:'(?>[^\\']+|\\.)*')|(?:`(?>[^\\`]+|\\.)*`))

# Networking
MAC (?:%{CISCOMAC}|%{WINDOWSMAC}|%{COMMONMAC})
Expand Down

0 comments on commit b9c8d26

Please sign in to comment.