Regular regexes
The goal of this repo is avoid having to look up commonly used regexes, but have them all bundled in a single place. The focus is on identifiers useful in investigations: identity documents, bank and company numbers, phones and SIMs, crypto addresses, vehicles, ships and containers, locations and messaging links.
Usage
Install the package using pip install regular-regexes
from regular_regexes import rre
rre.email("mail me at jan@test.com or piet@test.be") # ['jan@test.com', 'piet@test.be']
rre.be.license_plate("car 1-ABC-123") # ['1-ABC-123']
rre.be.iban("BE68 5390 0754 7035") # [] (checksum fails)
Every function takes a string and returns the list of matched strings.
rre.ios_system_path and rre.android_system_path take a path on the device, as forensic tools report it, and match
it when it lies in a folder the OS keeps for itself (read-only, the same on every phone of a version, nothing the user
made): iOS's system volume (/System/, /Library/, /Applications/, /Developer/, /usr/, /bin/, /sbin/) and
/private/preboot/Cryptexes/; Android's /system/, /system_ext/, /system_root/, /product/, /vendor/, /odm/,
/oem/, /apex/, /bin/, /sbin/. Only at the start of the path, case-sensitive: /data/system/... or
/private/var/mobile/Library/... (user data) do not match.
rre.ios_system_path("/System/Library/PrivateFrameworks/x.caf") # ['/System/Library/PrivateFrameworks/x.caf']
rre.android_system_path("/data/system/usagestats/0") # []
Universal regexes are on rre directly, country specific ones under their two letter country code.
Where an identifier has a checksum (IBAN, national number, Luhn, crypto addresses, MRZ, ...) the match is also validated, so random numbers of the right shape are dropped.
Available regexes
All regexes, their patterns and checksum validators, with search:
upshiftbe.github.io/regular-regexes.
The site is generated from the regexes.json files on every push to main; to preview it locally:
pip install -r docs/requirements.txt
mkdocs serve
Adding regexes
Universal regexes go in regular_regexes/intl/regexes.json. Country specific ones go in regular_regexes/<country code>/regexes.json
(e.g. regular_regexes/be/regexes.json). A new country folder is picked up automatically.
A regex can be paired with a checksum validator from regular_regexes/validators.py; matches that fail it are dropped:
"iban": {"regex": "...", "validator": "iban"}
Tests live in the same layout: tests/<country code>/test_regexes.py and tests/intl/test_regexes.py.
Run them with pytest.
Metadata
Release files for regular-regexes 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| regular_regexes-0.1.0.tar.gz | 9.9 kB | With provenance | Details for regular_regexes-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| regular_regexes-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for regular_regexes-0.1.0-py3-none-any.whl |
Total release size: 19.4 kB
Release files / regular_regexes-0.1.0.tar.gz
| Download URL | regular_regexes-0.1.0.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2c2d96a76158d6d8e637fc5c39807abeb6af13d6e5d5beb0c45fe0f4e27211d
|
|
BLAKE2b-256 checksum How to use checksums |
c1d377ee71e99312008b71920989a0d9d7ca921d3a3a3f3c4de8e36b22115697
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logRelease files / regular_regexes-0.1.0-py3-none-any.whl
| Download URL | regular_regexes-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58ddc19bb5b0625409895c40d9d3412db724cf248674eef727f551fd8a393cf0
|
|
BLAKE2b-256 checksum How to use checksums |
626b8df9e160f97ac713176dc46e277c533928cb3273e7dd40f5920729f09b57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logSecurity for regular-regexes 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for regular_regexes-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.