{"id":28484346,"url":"https://github.com/slashusrvin/ip2regex-shell","last_synced_at":"2025-06-29T22:31:16.203Z","repository":{"id":293799836,"uuid":"985164809","full_name":"SlashUsrVin/IP2Regex-Shell","owner":"SlashUsrVin","description":"Converts an IP or an IP range to regex (works well with ipcalc)","archived":false,"fork":false,"pushed_at":"2025-05-26T17:21:04.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T22:06:46.308Z","etag":null,"topics":["conntrack-ip-regex","ip-range-regex","ip-regex-converter","ip-regex-sh","ip-to-regex","ip2regex","posix-shell","regex","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SlashUsrVin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null}},"created_at":"2025-05-17T07:35:35.000Z","updated_at":"2025-05-26T17:21:07.000Z","dependencies_parsed_at":"2025-05-17T08:40:27.262Z","dependency_job_id":null,"html_url":"https://github.com/SlashUsrVin/IP2Regex-Shell","commit_stats":null,"previous_names":["mvin321/ip2regex-shell","slashusrvin/ip2regex-shell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SlashUsrVin/IP2Regex-Shell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SlashUsrVin%2FIP2Regex-Shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SlashUsrVin%2FIP2Regex-Shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SlashUsrVin%2FIP2Regex-Shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SlashUsrVin%2FIP2Regex-Shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SlashUsrVin","download_url":"https://codeload.github.com/SlashUsrVin/IP2Regex-Shell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SlashUsrVin%2FIP2Regex-Shell/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262678213,"owners_count":23347327,"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":["conntrack-ip-regex","ip-range-regex","ip-regex-converter","ip-regex-sh","ip-to-regex","ip2regex","posix-shell","regex","shell-script"],"created_at":"2025-06-07T22:06:47.451Z","updated_at":"2025-06-29T22:31:16.189Z","avatar_url":"https://github.com/SlashUsrVin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP2Regex-Shell  \nConverts an IP or an IP range to regex (works well with ipcalc)  \n  \n    ./ip2regex.sh \"192.168.1.0\" \"192.168.1.255\"\n    \n    OUTPUT: (192)\\.(168)\\.(1)\\.([0-9]|[2-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\n  \n## Regular Expression Logic  \n#### Regex is built per octet and done in up to 5 parts, depending from the range to be built.  \n  \n#### Example 1: (Full Range)  \nInput Range: 0 - 255  \nRegex Output: [0-9] | [1-9][0-9] | 1[0-9][0-9] | 2[0-4][0-9] | 25[0-5]  \n|    FIRST9 |     PART99    |     PART199    |      PRIOR-10TH  |      FINAL9   |  \n|:-------:|:--------------:|:---------------:|:---------------:|:----------:|  \n|   0 - 9   |     10 - 99      |     100 - 199     |     200 - 249     |   250 - 255  |  \n|  [0-9]  |   [1-9][0-9]   |   1[0-9][0-9]   |   2[0-4][0-9]   |   25[0-5]  |  \n  \n#### Example 2:  \nInput Range: 1 - 8  \nRegex Output: [1-8]  \n|    FIRST9 |     PART99    |     PART199    |      PRIOR-10TH  |      FINAL9   |  \n|:-------:|:--------------:|:---------------:|:---------------:|:----------:|  \n|     |           |          |          |   1 - 8  |  \n|  N/A |   N/A   |   N/A   |   N/A |   [1-8]  |  \n\n#### Example 3:  \nInput Range: 1 - 45  \nRegex Output:  [1-9] | [1-3][0-9] | 4[0-5]  \n|    FIRST9 |     PART99    |     PART199    |      PRIOR-10TH  |      FINAL9   |  \n|:-------:|:--------------:|:---------------:|:---------------:|:----------:|  \n|   1 - 9   |           |        |     10 - 39     |   40 - 45  |  \n|  [1-9]  |  N/A   |   N/A   |   [1-3][0-9]   |   4[0-5]  |  \n  \n#### Example 4:  \nInput Range: 20 - 135  \nRegex Output:  [1-9] | [1-3][0-9] | 4[0-5]  \n|    FIRST9 |     PART99    |     PART199    |      PRIOR-10TH  |      FINAL9   |  \n|:-------:|:--------------:|:---------------:|:---------------:|:----------:|  \n|   20 - 29   |   30 - 99        |        |     100 - 129     |   130 - 135  |  \n|  2[0-9]  |  [3-9][0-9]   |   N/A   |   1[0-2][0-9]   |   13[0-5]  |  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashusrvin%2Fip2regex-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslashusrvin%2Fip2regex-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashusrvin%2Fip2regex-shell/lists"}