add support for regex in mutate.split()

Description

I have a need to split a field into an array based on a \n new line char, however this does not work. Instead now I have to do a mutate.gsub that converts newlines to some ascii character (like ~), only then can I invoke mutate.split() to get what I want. Also the latter does not work unless grok singles=true is enabled.

Gliffy Diagrams

Activity

Show:

Philippe Weber January 26, 2015 at 5:17 AM

Closing as already registered in github issues
Similar discussion in https://github.com/elasticsearch/logstash/issues/1750
Root cause analysis in https://github.com/elasticsearch/logstash/issues/1645

bitsofinfo September 17, 2013 at 12:40 PM

Neither of these work, I just end up w/ the single string (v1.2.1)

mutate {
split => [ "myField" , "/\n/" ]

}

mutate {
split => [ "myField" , "\n" ]

}

Richard Pijnenburg September 12, 2013 at 11:49 AM

Hi,

by default the split filter should split on the '\n' character.
Will see if we can find something wrong with it.

Duplicate

Details

Assignee

Reporter

Affects versions

Created September 11, 2013 at 2:45 PM
Updated January 26, 2015 at 5:17 AM
Resolved January 26, 2015 at 5:17 AM