Detect the last character of a field

Hello,

I'd like to detect of the last character of a field is "/" so I can know whether I'm accessing a directory or a file. Is it possible?

Thanks for your help,
Noémie

Use a regexp conditional.

if [fieldname] =~ /\/$/ {
  ...
}

https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#conditionals