{"id":15032738,"url":"https://github.com/ruby/strscan","last_synced_at":"2026-04-02T19:18:30.094Z","repository":{"id":19315245,"uuid":"86764830","full_name":"ruby/strscan","owner":"ruby","description":"Provides lexical scanning operations on a String.","archived":false,"fork":false,"pushed_at":"2025-05-03T04:32:47.000Z","size":437,"stargazers_count":82,"open_issues_count":5,"forks_count":38,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-05-05T08:40:48.127Z","etag":null,"topics":["ruby","strscan"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"COPYING","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":"2017-03-31T01:24:40.000Z","updated_at":"2025-05-03T04:32:50.000Z","dependencies_parsed_at":"2024-01-20T23:26:56.388Z","dependency_job_id":"a158ecc8-12f4-401e-a5a8-443870b98008","html_url":"https://github.com/ruby/strscan","commit_stats":{"total_commits":273,"total_committers":47,"mean_commits":5.808510638297872,"dds":0.7216117216117216,"last_synced_commit":"734b823463a37ca77ccc9b416e611d19d78aae5f"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fstrscan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fstrscan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fstrscan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fstrscan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/strscan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252533654,"owners_count":21763631,"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":["ruby","strscan"],"created_at":"2024-09-24T20:19:18.127Z","updated_at":"2026-01-06T09:14:54.733Z","avatar_url":"https://github.com/ruby.png","language":"C","readme":"# StringScanner\n\n[![CI](https://github.com/ruby/strscan/actions/workflows/ci.yml/badge.svg)](https://github.com/ruby/strscan/actions/workflows/ci.yml)\n\nStringScanner provides for lexical scanning operations on a String.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'strscan'\n```\n\nAnd then execute:\n\n```console\n$ bundle\n```\n\nOr install it yourself as:\n\n```console\n$ gem install strscan\n```\n\n## Usage\n\n```ruby\nrequire 'strscan'\n\ns = StringScanner.new('This is an example string')\ns.eos?               # -\u003e false\n\np s.scan(/\\w+/)      # -\u003e \"This\"\np s.scan(/\\w+/)      # -\u003e nil\np s.scan(/\\s+/)      # -\u003e \" \"\np s.scan(/\\s+/)      # -\u003e nil\np s.scan(/\\w+/)      # -\u003e \"is\"\ns.eos?               # -\u003e false\n\np s.scan(/\\s+/)      # -\u003e \" \"\np s.scan(/\\w+/)      # -\u003e \"an\"\np s.scan(/\\s+/)      # -\u003e \" \"\np s.scan(/\\w+/)      # -\u003e \"example\"\np s.scan(/\\s+/)      # -\u003e \" \"\np s.scan(/\\w+/)      # -\u003e \"string\"\ns.eos?               # -\u003e true\n\np s.scan(/\\s+/)      # -\u003e nil\np s.scan(/\\w+/)      # -\u003e nil\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake` to compile this and run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/strscan.\n\n\n## License\n\nThe gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fstrscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Fstrscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fstrscan/lists"}