I'm parsing a log message with arbitrary fields. In my message we have field within two quotations in these two formats
"text/html"
"text/html; charset=UTF-8"
I can handle each one separately.
For first one I use "%{WORD:type}/%{DATA:subtype}" and for the second one I use "%{WORD:type}/%{DATA:subtype}; charset=%{DATA:encoding}" but how can I use grok to handle both type simultaneously?