{"id":19358060,"url":"https://github.com/faveod/strscan-java","last_synced_at":"2026-06-22T10:31:33.288Z","repository":{"id":166375228,"uuid":"641432219","full_name":"Faveod/strscan-java","owner":"Faveod","description":"A clone of Ruby's StringScanner","archived":false,"fork":false,"pushed_at":"2024-11-07T17:01:11.000Z","size":94,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-24T11:49:49.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/Faveod.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}},"created_at":"2023-05-16T13:06:10.000Z","updated_at":"2024-11-07T17:01:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"bce5edc3-b8e0-4723-a506-15c1604914dc","html_url":"https://github.com/Faveod/strscan-java","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Faveod/strscan-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Faveod%2Fstrscan-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Faveod%2Fstrscan-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Faveod%2Fstrscan-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Faveod%2Fstrscan-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Faveod","download_url":"https://codeload.github.com/Faveod/strscan-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Faveod%2Fstrscan-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34645681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"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-10T07:10:09.897Z","updated_at":"2026-06-22T10:31:33.270Z","avatar_url":"https://github.com/Faveod.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StringScanner\n\n[![Java CI](https://github.com/Faveod/strscan-java/actions/workflows/ci.yml/badge.svg)](https://github.com/Faveod/strscan-java/actions/workflows/ci.yml)\n\nThis is a clone of [Ruby's `StringScanner`](https://docs.ruby-lang.org/en/3.2/StringScanner.html) from `strscan`.\n\nIt's not feature complete, but it has all the minimum scanning features\nexpected.\n\n## Examples\n\n### `scan`\n\nTries to match with pattern at the current position. If there's a match, the scanner advances the “scan pointer” and\nreturns the matched string. Otherwise, the scanner returns `null`.\n\n```java\nimport fr.blackteam.strscan.StringScanner;\nimport java.util.regex.Pattern;\n\nvar words = Pattern.compile(\"\\\\w+\");\nvar spaces = Pattern.compile(\"\\\\s+\");\nvar s = new StringScanner(\"This is an example string\");\n\ns.isEos();         // -\u003e false\n\ns.scan(words);     // -\u003e \"This\"\ns.scan(words);     // -\u003e nil\ns.scan(spaces);    // -\u003e \" \"\ns.scan(spaces);    // -\u003e nil\ns.scan(words);     // -\u003e \"is\"\ns.isEos();         // -\u003e false\n\ns.scan(spaces);    // -\u003e \" \"\ns.scan(words);     // -\u003e \"an\"\ns.scan(spaces);    // -\u003e \" \"\ns.scan(words);     // -\u003e \"example\"\ns.scan(spaces);    // -\u003e \" \"\ns.scan(words);     // -\u003e \"string\"\ns.isEos();         // -\u003e true\n\ns.scan(spaces);    // -\u003e nil\ns.scan(words);     // -\u003e nil\n```\n\n### `scanUntil`\n\nScans the string until the pattern is matched. Returns the substring up to and including the end of the match, advancing\nthe scan pointer to that location. If there is no match, `null` is returned.\n\n```java\nimport fr.blackteam.strscan.StringScanner;\nimport java.util.regex.Pattern;\n\nvar s = new StringScanner(\"Fri Dec 12 1975 14:39\");\ns.scanUntil(\"1\");  // -\u003e \"Fri Dec 1\"\ns.getPos();        // -\u003e 9\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaveod%2Fstrscan-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaveod%2Fstrscan-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaveod%2Fstrscan-java/lists"}