2022-08-04 00:05:19 +02:00
|
|
|
package parsers
|
|
|
|
|
|
|
|
import "regexp"
|
|
|
|
|
|
|
|
type LanguageParserFunc func(str string) []string
|
|
|
|
|
|
|
|
var SquareBracketsLanguageParserRegex = regexp.MustCompile(`\[.+?\]`)
|
|
|
|
|
|
|
|
func SquareBracketsLanguageParser(str string) []string {
|
2022-08-15 14:29:43 +02:00
|
|
|
return TrimPrefixSuffix(SquareBracketsLanguageParserRegex.FindAllString(str, -1), "[", "]")
|
2022-08-04 00:05:19 +02:00
|
|
|
}
|