How to replace or remove hyphen (-) in a string field

I have a string field called log_type,
which may contains string like "-- INFO".
I'd like to remove hyphens (i. e. replace hyphen with empty string),
how to do it?
I have tried mutate gsub, like this:

mutate {
  gsub => ["log_type", "--", ""]
  ......

but the result will be "-0- INFO". Why?

What does you get from?...

mutate { gsub => ["log_type", "-", ""] }

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