{"id":19579795,"url":"https://github.com/abo/regen","last_synced_at":"2025-08-10T16:42:51.227Z","repository":{"id":137069386,"uuid":"59801418","full_name":"abo/regen","owner":"abo","description":"A regexp generator of field for log analytics","archived":false,"fork":false,"pushed_at":"2025-01-21T02:04:46.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-11T09:09:05.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2016-05-27T03:31:29.000Z","updated_at":"2025-01-21T02:04:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"24754287-4f47-47fb-83df-09943685a793","html_url":"https://github.com/abo/regen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abo/regen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abo%2Fregen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abo%2Fregen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abo%2Fregen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abo%2Fregen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abo","download_url":"https://codeload.github.com/abo/regen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abo%2Fregen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269755487,"owners_count":24470536,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-11T07:19:10.009Z","updated_at":"2025-08-10T16:42:51.025Z","avatar_url":"https://github.com/abo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"regen\n=====\nA regexp generator of field for log analytics\n\nTutorial\n--------\n```\npackage main\n\nimport (\n    \"fmt\"\n    \"regexp\"\n\t\"strings\"\n    \"github.com/abo/regen\"\n)\n\nfunc main() {\n    mailsv := `Thu May 15 2015 00:15:05 mailsv1 sshd[2716]: Failed password for invalid user postgres from 86.212.199.60 port 4093 ssh2\nThu May 15 2015 00:15:05 mailsv1 sshd[2596]: Failed password for invalid user whois from 86.212.199.60 port 3311 ssh2\nThu May 15 2015 00:15:05 mailsv1 sshd[24947]: pam_unix(sshd:session): session opened for user djohnson by (uid=0)\nThu May 15 2015 00:15:05 mailsv1 sshd[3006]: Failed password for invalid user info from 86.212.199.60 port 4078 ssh2\nThu May 15 2015 00:15:05 mailsv1 sshd[5298]: Failed password for invalid user postgres from 86.212.199.60 port 1265 ssh2`\n    lines := strings.Split(mailsv, \"\\n\")\n    \n    pattern, _ := Generate(lines[0], \"2716\")\n    re := regexp.MustCompile(pattern)\n    \n    pids := make([]string, len(lines))\n    for i, l := range lines {\n\t\tmatches := re.FindStringSubmatch(l)\n        pids[i] = matches[1]\n    }\n    fmt.Print(pids)\n    //Output: [2716 2596 24947 3006 5298]\n    \n}    \n```\n\nDocumentation\n-------------\n\n\nSource Code\n----------\nCOMING SOON...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabo%2Fregen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabo%2Fregen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabo%2Fregen/lists"}