Libbeat common.Match not work with case insensitive

beats document said filebeat suppport "(?i)" regexp
https://www.elastic.co/guide/en/beats/filebeat/current/regexp-support.html#grouping
I read the beats code,found it depend on beats/libbeat/common/match,
but I found beats/libbeat/common/match does not work with "(?i)" option
version: github.com/elastic/beats v7.3.0
output:

not match
match

code:

package main

import (
	"fmt"
	"log"
	"regexp"

	"github.com/elastic/beats/libbeat/common/match"
)

func main() {
	pattern := `(?i)warning`
	str := `warning`
	m, err := match.Compile(pattern)
	if err != nil {
		log.Fatal(err.Error())
	}
	if m.MatchString(str) {
		fmt.Println("match")
	} else {
		fmt.Println("not match")
	}
	m2, err := regexp.Compile(pattern)
	if err != nil {
		log.Fatal(err.Error())
	}
	ok := m2.MatchString(str)
	if ok {
		fmt.Println("match")
	} else {
		fmt.Println("not match")
	}
}

I was able to reproduce this. I opened PR #13250 with a fix.