Skip to content

Commit

Permalink
add regex support for -eh (#4437)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir authored Nov 28, 2023
1 parent 578e301 commit 7cd340b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/core/inputs/hybrid/hmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"
"io"
"os"
"regexp"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -437,7 +438,8 @@ func (i *Input) delItem(metaInput *contextargs.MetaInput) {
return err
}

if tmpUrl.Host == targetUrl.Host {
matched, _ := regexp.MatchString(metaInput.Input, tmpUrl.Host)
if tmpUrl.Host == targetUrl.Host || matched {
_ = i.hostMap.Del(tmpKey)
i.excludedHosts[tmpKey] = struct{}{}
i.excludedCount++
Expand Down

0 comments on commit 7cd340b

Please sign in to comment.