gint
log_proto_prefix_suffix_multiline_get_offset_of_garbage(LogProtoREMultiLineServer *self, const guchar* line, gsize line_len)
{
  gint match[3];
  if (_find_regexp(self->garbage, line, line_len, match, 1) < 0)
    return -1;
  return match[1];
};
static gboolean
_regexp_matches(MultiLineRegexp *re, const guchar *str, gsize len)
{
  gint match[3];
  if (_find_regexp(re, str, len, match, 1) < 0)
    return FALSE;
  return match[0] >= 0;
}
static gint
_accumulate_initial_line(LogProtoREMultiLineServer *self,
                         const guchar *line,
                         gsize line_len,
                         gssize consumed_len)
{
  gint offset_of_garbage;

  offset_of_garbage = _find_regexp(self->garbage, (const gchar *) line, line_len);
  if (offset_of_garbage >= 0)
    return LPT_CONSUME_PARTIALLY(line_len - offset_of_garbage) | LPT_EXTRACTED;
  else
    return LPT_CONSUME_LINE | LPT_WAITING;

}
static gboolean
_regexp_matches(MultiLineRegexp *re, const gchar *str, gsize len)
{
  return _find_regexp(re, str, len) >= 0;
}