You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

725 B


GoDoc Travis

Extract urls from text using regular expressions. Requires Go 1.10.3 or later.

import ""

func main() {
	xurls.Relaxed().FindString("Do gophers live in")
	// ""
	xurls.Strict().FindAllString(" is", -1)
	// []string{""}

Note that the funcs compile regexes, so avoid calling them repeatedly.


go get -u
$ echo "Do gophers live in" | xurls