extract

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Generic is a basic domain regexp pattern
	// from: https://stackoverflow.com/a/30007882/221569
	//
	// It does very well, but matches ipv4 addresses in some cases.
	Generic = `(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Extractor

type Extractor interface {
	Extract(io.Reader) (*set.Set[string], error)
}

An Extractor reads content from an io.Reader and extracts domains into a Set.

func New

func New(re string) Extractor

New creates a new Extractor, using regular expression re to match domains.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL