# string_scanner

> Parse strings with a sequence of patterns in Dart

Source: https://talira.ai/catalog/string-scanner-4d2b0jes
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / text / strings](https://talira.ai/categories/libraries/text/strings), [languages / dart](https://talira.ai/categories/languages/dart)
- Licence: BSD-3-Clause[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Google](https://talira.ai/orgs/google.md)
- Funding: public company (NASDAQ:GOOGL)[^2]

string_scanner is the Dart team's package for parsing a string with a series of patterns. Its `StringScanner` moves a pointer through the source: `scan` tries to consume a pattern and says whether it matched, `expect` consumes one or throws a format error, and `lastMatch` holds the most recent match. It lives in the dart-lang/tools repository and is under the BSD-3-Clause licence.

## Links

- GitHub: https://github.com/dart-lang/tools

## Problems it solves

- write a small hand-written parser in Dart
- consume a string pattern by pattern with regular expressions in Dart
- parse a simple text format without a parser generator in Dart

## Features

- StringScanner for parsing a string with a sequence of patterns
- scan, expect and matches with the last match kept
- format errors that point at the failing position

## Trust

Overall: 0.63 out of 1.
Signals: maintenance 1.00, adoption 0.42, momentum 0.17, community 0.99, backing 0.55, extensibility 0.00.

- last commit 3 days ago
- 200 commits in the last 90 days
- latest release api_summary-v1.3.1 3 days ago
- 123 GitHub stars
- 302 contributors
- backed by Google
- funding: public company (NASDAQ:GOOGL)

## Sources

[^1]: https://github.com/dart-lang/tools/blob/main/pkgs/string_scanner/LICENSE (checked 27 Nov 2026)
[^2]: https://www.sec.gov/files/company_tickers_exchange.json (checked 20 Nov 2026)
