{"id":13413991,"url":"https://github.com/mvdan/xurls","last_synced_at":"2025-05-11T03:45:55.596Z","repository":{"id":25677298,"uuid":"29113216","full_name":"mvdan/xurls","owner":"mvdan","description":"Extract urls from text","archived":false,"fork":false,"pushed_at":"2025-02-22T14:31:19.000Z","size":450,"stargazers_count":1217,"open_issues_count":2,"forks_count":117,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-05-05T21:35:57.598Z","etag":null,"topics":["extract-urls","go","tld"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mvdan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"mvdan"}},"created_at":"2015-01-12T01:28:46.000Z","updated_at":"2025-05-05T18:03:33.000Z","dependencies_parsed_at":"2024-01-01T12:25:18.158Z","dependency_job_id":"5544da79-e43b-4ce9-b037-70658251a433","html_url":"https://github.com/mvdan/xurls","commit_stats":{"total_commits":447,"total_committers":16,"mean_commits":27.9375,"dds":0.06487695749440714,"last_synced_commit":"efa022a73b86be5b3321da60db15ab1c1bf657ee"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Fxurls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Fxurls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Fxurls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Fxurls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvdan","download_url":"https://codeload.github.com/mvdan/xurls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252593855,"owners_count":21773545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extract-urls","go","tld"],"created_at":"2024-07-30T20:01:54.621Z","updated_at":"2025-05-08T00:59:46.725Z","avatar_url":"https://github.com/mvdan.png","language":"Go","funding_links":["https://github.com/sponsors/mvdan"],"categories":["开源类库","Go","文本处理","Open source library","Text Processing","\u003cspan id=\"文字处理-text-processing\"\u003e文字处理 Text Processing\u003c/span\u003e","Repositories","文本處理","Utility","文本处理`解析和操作文本的代码库`","Bot Building","Template Engines"],"sub_categories":["文本处理","刮刀","Word Processing","Scrapers","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","高級控制台界面","Advanced Console UIs","HTTP Clients","查询语","交流","高级控制台界面"],"readme":"# xurls\n\n[![Go Reference](https://pkg.go.dev/badge/mvdan.cc/xurls/v2.svg)](https://pkg.go.dev/mvdan.cc/xurls/v2)\n\nExtract urls from text using regular expressions. Requires Go 1.23 or later.\n\n```go\nimport \"mvdan.cc/xurls/v2\"\n\nfunc main() {\n\trxRelaxed := xurls.Relaxed()\n\trxRelaxed.FindString(\"Do gophers live in golang.org?\")  // \"golang.org\"\n\trxRelaxed.FindString(\"This string does not have a URL\") // \"\"\n\n\trxStrict := xurls.Strict()\n\trxStrict.FindAllString(\"must have scheme: http://foo.com/.\", -1) // []string{\"http://foo.com/\"}\n\trxStrict.FindAllString(\"no scheme, no match: foo.com\", -1)       // []string{}\n}\n```\n\nSince API is centered around [regexp.Regexp](https://pkg.go.dev/regexp#Regexp),\nmany other methods are available, such as finding the [byte indexes](https://pkg.go.dev/regexp#Regexp.FindAllIndex)\nfor all matches.\n\nThe regular expressions are compiled when the API is first called.\nAny subsequent calls will use the same regular expression pointers.\n\n#### cmd/xurls\n\nTo install the tool globally:\n\n\tgo install mvdan.cc/xurls/v2/cmd/xurls@latest\n\n```shell\n$ echo \"Do gophers live in http://golang.org?\" | xurls\nhttp://golang.org\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvdan%2Fxurls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvdan%2Fxurls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvdan%2Fxurls/lists"}