ipextract

package
v0.0.0-...-542e895 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IPv4

func IPv4(text string) (addresses []netip.Addr)

IPv4 extracts all valid IPv4 addresses from a given text string. Each IPv4 address must be separated by a character not part of the IPv4 alphabet (0123456789.). Performance-wise, this extraction is at least x3 times faster than using a regular expression.

func IPv6

func IPv6(text string) (addresses []netip.Addr)

IPv6 extracts all valid IPv6 addresses from a given text string. Each IPv6 address must be separated by a character not part of the IPv6 alphabet (0123456789abcdefABCDEF:). Performance-wise, this extraction is at least x3 times faster than using a regular expression.

Types

This section is empty.

Jump to

Keyboard shortcuts

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