0

I tried to use follow regex: (a)?b(?(1)c|d). It is example from http://www.regular-expressions.info/conditional.html.

But I got error.

/opt/logstash-1.4.2/bin/logstash -e 'input { stdin { } }  filter { grok { match => [ "message", "(a)?b(?(1)c|d)" ] } } output { stdout { codec => rubydebug }}'
+---------------------------------------------------------+
| An unexpected error occurred. This is probably a bug.   |
| You can find help with this problem in a few places:    |
|                                                         |
| * chat: #logstash IRC channel on freenode irc.          |
|     IRC via the web: http://goo.gl/TI4Ro                |
| * email: logstash-users@googlegroups.com                |
| * bug system: https://logstash.jira.com/                |
|                                                         |
+---------------------------------------------------------+
The error reported is: 
  undefined group option: /(a)?b(?(1)c|d)/
fervid
  • 2,033
  • 3
  • 13
  • 13

1 Answers1

0

Logstash uses Oniguruma Regular Expressions. Their doc says that this is a "Lacked features compare with perl 5.8.0". So, no.

Alain Collins
  • 16,268
  • 2
  • 32
  • 55