How to extract fields of an array with logstash?


i have a field with this format value:


and i want to use a scanner tu extract the nested fields with something like this:

  ruby {
      code => "
         event.set('prueba', event.get('[mail]').scan( (?<=\[")(.*?)(?=\"]) ))

Wich regular expression can i use ??

thanks in advanced!!

i finally solved it.

i use this one:

  ruby {
      code => "event.set('prueba', event.get('[mail]').scan(/\"(.*?)\"/))"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.