Metadata-Version: 2.4
Name: id-extract
Version: 0.3.0
Summary: Extract structured identifiers (IDs, cards, IBAN, email) with RE2 and checksums.
Author-email: Leonid Ganeline <leo.gan.57@gmail.com>
License: MIT
Project-URL: repository, https://github.com/leo-gan/anonymizer
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: google-re2

# id-extract

Find structured identifiers in text. This package returns character offsets. It does not replace values or open files.

```bash
pip install id-extract
```

```python
from id_extract import extract

for hit in extract("ABN 51 824 753 556 and ada@example.com"):
    print(hit["type"], hit["text"], hit["start"], hit["end"])
```

The default is every bundled country. Narrow the set with `countries=["AU", "GB"]`. `UK` is accepted as `GB`. State, provincial, and industry patterns stay off until you pass `opt_in="all"` or a list of keys.

Full guide, including one page per country with official sources:

- [id-extract overview](https://leo-gan.github.io/anonymizer/id-extract/)
- [Install and API](https://leo-gan.github.io/anonymizer/id-extract/api/)
- [Country catalog](https://leo-gan.github.io/anonymizer/id-extract/countries/)
- Example: [Australia (ABN, TFN)](https://leo-gan.github.io/anonymizer/id-extract/countries/au/)

A hit means the text looked like that identifier. It is not a legal determination.
