Building 70 Projects ranging from beginner to advanced so anyone can — learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company 👇
Go aicertificationcloud-engineeringcybercybersecuritycybersecurity-analystcybersecurity-certificationcybersecurity-certificationscybersecurity-educationcybersecurity-jobscybersecurity-portfoliocybersecurity-projectscybersecurity-toolsgrchackinglearningpentestingproject-repositoryprojetcspython
// ©AngelaMos | 2026
// extract.go
package cve
import (
"regexp"
"sort"
"strings"
)
var pattern = regexp.MustCompile(`(?i)CVE-\d{4}-\d{4,7}`)
func Extract(texts ...string) []string {
seen := make(map[string]struct{})
var out []string
for _, text := range texts {
for _, match := range pattern.FindAllString(text, -1) {
id := strings.ToUpper(match)
if _, ok := seen[id]; ok {
continue
}
seen[id] = struct{}{}
out = append(out, id)
}
}
sort.Strings(out)
return out
}