An open API service indexing awesome lists of open source software.

https://github.com/MakarMS/text-probe

Simple and extensible PHP library for text analysis and pattern matching, designed to help developers probe, parse, and manipulate text efficiently.
https://github.com/MakarMS/text-probe

addresses-parsing contributions-welcome datetime discord email good-first-contribution good-first-issue good-first-pr help-wanted mbstring open-source phone-number php regex regexp slack telegram text-analysis uuid

Last synced: 8 days ago
JSON representation

Simple and extensible PHP library for text analysis and pattern matching, designed to help developers probe, parse, and manipulate text efficiently.

Awesome Lists containing this project

README

          

# TextProbe

[![PHP Version Require](http://poser.pugx.org/makarms/text-probe/require/php)](https://packagist.org/packages/makarms/text-probe) [![Latest Stable Version](http://poser.pugx.org/makarms/text-probe/v)](https://packagist.org/packages/makarms/text-probe) [![PHP Tests](https://github.com/MakarMS/text-probe/actions/workflows/php-tests.yml/badge.svg?branch=main)](https://github.com/MakarMS/text-probe/actions/workflows/php-tests.yml) [![codecov](https://codecov.io/github/MakarMS/text-probe/graph/badge.svg?token=HFDSEGHGH4)](https://codecov.io/github/MakarMS/text-probe) [![License](http://poser.pugx.org/makarms/text-probe/license)](https://packagist.org/packages/makarms/text-probe)

**TextProbe** is a simple and extensible PHP library for text analysis and pattern matching. It is designed to help
developers probe, parse, and manipulate text efficiently using customizable rules and matchers.

## Features

- 🧠 Easy-to-use API for text matching and parsing
- πŸ”§ Extensible architecture β€” write your own matchers and rules
- πŸ’‘ Suitable for parsing logs, user input, or any structured text

## Installation

You can install the library via [Composer](https://getcomposer.org/):

```bash
composer require makarms/text-probe
```

## Available Probes

The library comes with several built-in probes to detect common patterns in text:

### πŸ§‘β€πŸ’» Contact & Identity

- `DiscordNewUsernameProbe` β€” extracts Discord usernames in the new format (e.g., `@username`), enforcing Discord’s
updated naming rules (length, characters, no consecutive dots).

- `DiscordOldUsernameProbe` β€” extracts classic Discord usernames in the format `username#1234`, ensuring proper
structure and valid discriminator.

- `EmailProbe` β€” extracts email addresses.

- `RussianPassportNumberProbe` β€” extracts Russian internal passport numbers (series and six-digit number), supporting
spaces or dashes between parts with basic structure validation.

- `PhoneProbe` β€” extracts phone numbers (supports various formats).

- `RussianSnilsProbe` β€” extracts Russian SNILS numbers (11 digits with checksum),
supporting compact or dashed formats like `11223344595` or `112-233-445 95`.

- `SlackUsernameProbe` β€” extracts Slack usernames (e.g., `@username`), supporting Slack-specific username rules such as
allowed characters, length limits, and no consecutive dots.

- `InstagramUsernameProbe` β€” extracts Instagram usernames (e.g., `@username`), allowing letters, digits, underscores,
and dots while rejecting invalid boundaries or consecutive dots.

- `TelegramUserLinkProbe` β€” extracts `t.me` links pointing to Telegram users.

- `TelegramUsernameProbe` β€” extracts Telegram usernames (e.g., `@username`).

- `UsSocialSecurityNumberProbe` β€” extracts U.S. Social Security Numbers (SSN) in the `XXX-XX-XXXX` format while
discarding structurally invalid area, group, or serial combinations.

#### πŸš— Vehicle

- `CarVinProbe` β€” extracts vehicle identification numbers (VINs), enforcing allowed characters and validating the
checksum digit.

#### πŸ›‚ Passports (MRZ)

- `MrzTd1Probe` β€” extracts MRZ TD1 blocks (3 lines Γ— 30 chars).

- `MrzTd2Probe` β€” extracts MRZ TD2 blocks (2 lines Γ— 36 chars).

- `MrzTd3Probe` β€” extracts MRZ TD3 blocks (2 lines Γ— 44 chars).

- `InternationalPassportProbe` β€” extracts MRZ passport blocks across TD1/TD2/TD3 formats.

#### 🧾 Tax Numbers

- `DeSteuerIdProbe` β€” extracts German Steuer-ID numbers.

- `DeSteuernummerProbe` β€” extracts German Steuernummer identifiers.

- `FrNumeroFiscalReferenceProbe` β€” extracts French numero fiscal reference numbers.

- `ItCodiceFiscaleProbe` β€” extracts Italian Codice Fiscale identifiers.

- `EsNifProbe` β€” extracts Spanish NIF identifiers.

- `NlBsnProbe` β€” extracts Dutch BSN numbers.

- `PlPeselProbe` β€” extracts Polish PESEL numbers.

- `PlNipProbe` β€” extracts Polish NIP numbers.

- `SePersonnummerProbe` β€” extracts Swedish personnummer identifiers.

- `NoFoedselsnummerProbe` β€” extracts Norwegian fΓΈdselsnummer identifiers.

- `ChAhvNummerProbe` β€” extracts Swiss AHV numbers.

- `GbUtrProbe` β€” extracts UK Unique Taxpayer Reference (UTR) numbers.

- `RuInnProbe` β€” extracts Russian tax identification numbers (INN).

- `UsEinProbe` β€” extracts US EIN numbers.

- `TaxNumberProbe` β€” extracts tax numbers across supported regions.

#### πŸ₯ Medical Policy

- `DeKrankenversichertennummerProbe` β€” extracts German Krankenversichertennummer numbers.

- `FrNirProbe` β€” extracts French NIR numbers.

- `ItTesseraSanitariaProbe` β€” extracts Italian tessera sanitaria identifiers.

- `EsSipNumberProbe` β€” extracts Spanish SIP numbers.

- `NlBsnMedicalProbe` β€” extracts Dutch BSN medical identifiers.

- `PlPeselMedicalProbe` β€” extracts Polish PESEL medical identifiers.

- `SePersonnummerMedicalProbe` β€” extracts Swedish personnummer medical identifiers.

- `NoFoedselsnummerMedicalProbe` β€” extracts Norwegian fΓΈdselsnummer medical identifiers.

- `ChAhvMedicalProbe` β€” extracts Swiss AHV medical identifiers.

- `GbNhsNumberProbe` β€” extracts UK NHS numbers.

- `RuOmsEnp16Probe` β€” extracts Russian OMS ENP16 numbers.

- `UsMemberIdProbe` β€” extracts US member identifiers.

- `MedicalPolicyNumberProbe` β€” extracts medical policy numbers across supported regions.

#### πŸͺͺ Driver Licenses

- `UkDrivingLicenceNumberProbe` β€” extracts UK driving licence numbers.

- `DeFuehrerscheinnummerProbe` β€” extracts German driving licence numbers.

- `FrNumeroPermisDeConduireProbe` β€” extracts French driving licence numbers.

- `ItNumeroPatenteProbe` β€” extracts Italian driving licence numbers.

- `EsNumeroPermisoConducirProbe` β€” extracts Spanish driving licence numbers.

- `NlRijbewijsNummerProbe` β€” extracts Dutch driving licence numbers.

- `PlNumerPrawaJazdyProbe` β€” extracts Polish driving licence numbers.

- `SeKoerkortsnummerProbe` β€” extracts Swedish driving licence numbers.

- `NoFoererkortnummerProbe` β€” extracts Norwegian driving licence numbers.

- `ChFuehrerausweisNummerProbe` β€” extracts Swiss driving licence numbers.

- `RuVoditelskoeUdostoverenieProbe` β€” extracts Russian driving licence numbers.

- `UsDriverLicenseNumberProbe` β€” extracts US driving licence numbers.

- `DriverLicenseProbe` β€” extracts driver licence numbers across supported regions.

#### 🏒 Company Registration

- `DeHandelsregisternummerProbe` β€” extracts German Handelsregister numbers.

- `FrSirenProbe` β€” extracts French SIREN numbers.

- `FrSiretProbe` β€” extracts French SIRET numbers.

- `ItCodiceReaProbe` β€” extracts Italian codice REA numbers.

- `EsCifProbe` β€” extracts Spanish CIF numbers.

- `NlKvKNummerProbe` β€” extracts Dutch KvK numbers.

- `PlKrsProbe` β€” extracts Polish KRS numbers.

- `SeOrganisationsnummerProbe` β€” extracts Swedish organisation numbers.

- `NoOrganisasjonsnummerProbe` β€” extracts Norwegian organisation numbers.

- `ChUidiProbe` β€” extracts Swiss UIDI numbers.

- `UkCompanyNumberProbe` β€” extracts UK company registration numbers.

- `RuOgrnProbe` β€” extracts Russian OGRN numbers.

- `UsCompanyRegistrationNumberProbe` β€” extracts US company registration numbers.

- `CompanyRegistrationNumberProbe` β€” extracts company registration numbers across supported regions.

### πŸ” Security & Auth

- `ApiKeyProbe` β€” extracts API keys from common provider prefixes (Stripe, GitHub, Google, AWS).

- `StripeSecretKeyProbe` β€” extracts Stripe secret keys (e.g., `sk_live_...`).

- `StripePublishableKeyProbe` β€” extracts Stripe publishable keys (e.g., `pk_test_...`).

- `GitHubClassicTokenProbe` β€” extracts GitHub classic personal access tokens (`ghp_...`).

- `GitHubFineGrainedTokenProbe` β€” extracts GitHub fine-grained personal access tokens (`github_pat_...`).

- `GoogleApiKeyProbe` β€” extracts Google API keys starting with `AIza`.

- `AwsAccessKeyIdProbe` β€” extracts AWS access key IDs (`AKIA`/`ASIA` + 16 chars).

- `BearerTokenProbe` β€” extracts bearer token strings (JWT or opaque).

- `OpaqueTokenProbe` β€” extracts opaque token strings (base64url-ish).

- `BasicAuthProbe` β€” extracts HTTP Basic auth base64 blobs.

- `BasicAuthBase64Probe` β€” extracts base64 blobs suitable for Basic auth.

- `OAuthAccessTokenProbe` β€” extracts OAuth access tokens in JWT or opaque form.

- `OAuthAccessTokenJwtProbe` β€” extracts OAuth access tokens in JWT form.

- `OAuthAccessTokenOpaqueProbe` β€” extracts opaque OAuth access tokens.

- `OAuthRefreshTokenProbe` β€” extracts OAuth refresh tokens in JWT or opaque form.

- `OAuthRefreshTokenJwtProbe` β€” extracts OAuth refresh tokens in JWT form.

- `OAuthRefreshTokenOpaqueProbe` β€” extracts opaque OAuth refresh tokens.

- `CsrfTokenProbe` β€” extracts CSRF tokens in hex, base64url, or UUID form.

- `CsrfTokenHexProbe` β€” extracts 32–128 character hexadecimal CSRF tokens.

- `CsrfTokenBase64UrlProbe` β€” extracts base64url-style CSRF tokens.

- `CsrfTokenUuidProbe` β€” extracts UUID-shaped CSRF tokens.

- `PasswordHashProbe` β€” extracts bcrypt and Argon2 password hashes.

- `BcryptHashProbe` β€” extracts bcrypt hashes with supported cost factors.

- `Argon2idHashProbe` β€” extracts Argon2id hashes with non-zero parameters.

- `Argon2iHashProbe` β€” extracts Argon2i hashes with non-zero parameters.

- `PrivateKeyProbe` β€” extracts PEM/OpenSSH private key blocks.

- `PemRsaPrivateKeyProbe` β€” extracts PEM-encoded RSA private key blocks.

- `PemPkcs8PrivateKeyProbe` β€” extracts PEM-encoded PKCS#8 private key blocks.

- `OpenSshPrivateKeyProbe` β€” extracts OpenSSH private key blocks.

- `PublicKeyProbe` β€” extracts PEM public keys and certificates.

- `PemPublicKeyProbe` β€” extracts PEM public key blocks.

- `PemCertificateProbe` β€” extracts PEM certificate blocks.

- `SshPublicKeyProbe` β€” extracts OpenSSH public key lines.

- `SshRsaPublicKeyProbe` β€” extracts ssh-rsa public keys.

- `SshEd25519PublicKeyProbe` β€” extracts ssh-ed25519 public keys.

- `SshEcdsaPublicKeyProbe` β€” extracts ECDSA OpenSSH public keys.

### πŸ“… Date & Time

- `DateProbe` β€” extracts dates in various formats (e.g., `YYYY-MM-DD`, `DD/MM/YYYY`, `2nd Jan 2023`).

- `DateTimeProbe` β€” extracts combined date and time in multiple common formats.

- `TimeProbe` β€” extracts times (e.g., `14:30`, `14:30:15`, optional AM/PM).

### πŸ’° Finance

#### πŸ’± Currency

- `CurrencyCodeProbe` β€” extracts ISO-4217 currency codes (e.g., `USD`, `EUR`) using a whitelist validator.

#### πŸ”— Crypto transaction IDs

- `BitcoinTxIdProbe` β€” extracts Bitcoin transaction IDs (64 hex characters).

- `EthereumTxHashProbe` β€” extracts Ethereum transaction hashes (`0x` + 64 hex characters).

- `LitecoinTxIdProbe` β€” extracts Litecoin transaction IDs (64 hex characters).

- `RippleTxIdProbe` β€” extracts Ripple transaction IDs (64 uppercase hex characters).

- `SolanaTxSignatureProbe` β€” extracts Solana transaction signatures (87–88 base58 characters).

- `TronTxIdProbe` β€” extracts Tron transaction IDs (64 hex characters).

- `UsdcAlgorandTxIdProbe` β€” extracts USDC Algorand transaction IDs (52 base32 characters).

- `UsdcErc20TxHashProbe` β€” extracts USDC ERC-20 transaction hashes (`0x` + 64 hex characters).

- `UsdcSolanaTxSignatureProbe` β€” extracts USDC Solana transaction signatures (87–88 base58 characters).

- `UsdtErc20TxHashProbe` β€” extracts USDT ERC-20 transaction hashes (`0x` + 64 hex characters).

- `UsdtOmniTxIdProbe` β€” extracts USDT Omni transaction IDs (64 hex characters).

- `UsdtTrc20TxIdProbe` β€” extracts USDT TRC-20 transaction IDs (64 hex characters).

- `CryptoTransactionIdProbe` β€” extracts transaction IDs across supported crypto networks.

#### 🧾 Invoices & payment references

- `InvoiceNumericIdProbe` β€” extracts numeric invoice identifiers (6+ digits).

- `InvoiceAlnumIdProbe` β€” extracts alphanumeric invoice identifiers (uppercase letters, digits, `-` and `/`).

- `InvoiceNumberProbe` β€” extracts invoice identifiers in numeric or alphanumeric form.

- `SepaRfReferenceProbe` β€” extracts SEPA RF references and validates Mod-97 checksums.

- `PaymentReferenceProbe` β€” extracts SEPA RF references or invoice identifiers.

#### πŸ› VAT numbers

- `AtUidProbe` β€” extracts Austria VAT numbers (`ATU########`).

- `BeVatNumberProbe` β€” extracts Belgium VAT numbers (`BE0#########`).

- `BgVatNumberProbe` β€” extracts Bulgaria VAT numbers (`BG#########` or `BG##########`).

- `CyVatNumberProbe` β€” extracts Cyprus VAT numbers (`CY########X`).

- `CzDicProbe` β€” extracts Czech VAT numbers (`CZ########`–`CZ##########`).

- `DeUstIdNrProbe` β€” extracts Germany VAT numbers (`DE#########`).

- `DkCvrProbe` β€” extracts Denmark VAT numbers (`DK########`).

- `EeKmkrProbe` β€” extracts Estonia VAT numbers (`EE#########`).

- `EsNifIvaProbe` β€” extracts Spain VAT numbers (`ES#########`).

- `FiAlvNumeroProbe` β€” extracts Finland VAT numbers (`FI########`).

- `FrNumeroTvaIntracommunautaireProbe` β€” extracts France VAT numbers (`FR**#########`).

- `GrAfmVatProbe` β€” extracts Greece VAT numbers (`EL#########`).

- `HrOibVatProbe` β€” extracts Croatia VAT numbers (`HR###########`).

- `HuAdoazonositoJelVatProbe` β€” extracts Hungary VAT numbers (`HU########`).

- `IeVatNumberProbe` β€” extracts Ireland VAT numbers (legacy and new formats).

- `ItPartitaIvaProbe` β€” extracts Italy VAT numbers (`IT###########`).

- `LtPvmMoketojoKodasProbe` β€” extracts Lithuania VAT numbers (`LT#########` or `LT############`).

- `LuNumeroTvaProbe` β€” extracts Luxembourg VAT numbers (`LU########`).

- `LvPvnRegNrProbe` β€” extracts Latvia VAT numbers (`LV###########`).

- `MtVatNumberProbe` β€” extracts Malta VAT numbers (`MT########`).

- `NlBtwNummerProbe` β€” extracts Netherlands VAT numbers (`NL#########B##`).

- `PlNipVatProbe` β€” extracts Poland VAT numbers (`PL##########`).

- `PtNifIvaProbe` β€” extracts Portugal VAT numbers (`PT#########`).

- `RoCuiVatProbe` β€” extracts Romania VAT numbers (`RO##`–`RO##########`).

- `SeVatNummerProbe` β€” extracts Sweden VAT numbers (`SE##########01`).

- `SiDavcnaStevilkaVatProbe` β€” extracts Slovenia VAT numbers (`SI########`).

- `SkDicVatProbe` β€” extracts Slovakia VAT numbers (`SK##########`).

- `GbVatNumberProbe` β€” extracts Great Britain VAT numbers (`GB#########`).

- `XiVatNumberProbe` β€” extracts Northern Ireland VAT numbers (`XI#########`).

- `ChUidMwstProbe` β€” extracts Switzerland VAT numbers (`CHE#########MWST|TVA|IVA`).

- `NoOrgnrMvaProbe` β€” extracts Norway VAT numbers (`NO#########MVA`).

- `VatNumberProbe` β€” extracts VAT numbers across supported regions.

#### 🏦 SWIFT references

- `UetrProbe` β€” extracts SWIFT UETR identifiers (UUID-like with constrained version/variant).

- `SwiftField20ReferenceProbe` β€” extracts SWIFT field 20 references (6–16 chars: A–Z, 0–9, `/` or `-`).

- `SwiftReferenceProbe` β€” extracts SWIFT references (UETR or field 20 reference).

#### πŸ’Έ PayPal

- `PaypalTransactionIdProbe` β€” extracts PayPal transaction IDs (17 uppercase alphanumeric characters).

#### πŸ’³ Stripe object IDs

- `StripePaymentIntentIdProbe` β€” extracts Stripe payment intent IDs (`pi_...`).

- `StripeChargeIdProbe` β€” extracts Stripe charge IDs (`ch_...`).

- `StripeCustomerIdProbe` β€” extracts Stripe customer IDs (`cus_...`).

- `StripeInvoiceIdProbe` β€” extracts Stripe invoice IDs (`in_...`).

- `StripeSubscriptionIdProbe` β€” extracts Stripe subscription IDs (`sub_...`).

- `StripePaymentMethodIdProbe` β€” extracts Stripe payment method IDs (`pm_...`).

- `StripeEventIdProbe` β€” extracts Stripe event IDs (`evt_...`).

- `StripeObjectIdProbe` β€” extracts Stripe object IDs across supported types.

#### 🧾 Prices

- `PriceProbe` β€” extracts price expressions combining numeric amounts with currency symbols (e.g., `$199`, `1 500β‚½`) or
ISO currency codes, including slash-separated pairs (e.g., `100 USD`, `99 EUR/UAH`). Supports spaces or commas as
thousand separators and dots or commas for decimal fractions.

#### 🏦 Bank Account

- `BankBicCodeProbe` β€” Extracts SWIFT/BIC codes (8–11 characters, e.g., `DEUTDEFF500`).

- `BankIbanNumberProbe` β€” Extracts IBAN numbers, supports spaces, validates using Mod-97.

- `BankRoutingNumberProbe` β€” Extracts US Routing Numbers (9 digits), validates the checksum.

#### πŸ’³ Bank Cards

> Supported formats: plain digits (e.g., `4111111111111111`), digits separated by spaces (e.g., `4111 1111 1111 1111`)
> or
> dashes (e.g., `4111-1111-1111-1111`). Only Luhn-valid numbers by default.

- `BankCardNumberProbe` β€” extracts major card schemes like Visa, Mastercard, Amex, and all other supported schemes
listed below.

- `BankAmexCardProbe` β€” American Express (prefixes: 34, 37), 15 digits.

- `BankDinersClubCardProbe` β€” Diners Club (prefixes: 30[0-5], 309, 36, 38, 39), 13–14 digits.

- `BankDiscoverCardProbe` β€” Discover (prefixes: 6011, 65, 644–649, 622126–622925), 16 digits.

- `BankJcbCardProbe` β€” JCB (prefixes: 3528–3589), 16 digits.

- `BankMaestroCardProbe` β€” Maestro (prefixes: 5018, 5020, 5038, 5612, 5893, 6304, 6759, 6761–6763), 16–19 digits.

- `BankMastercardCardProbe` β€” Mastercard (prefixes: 51–55, 2221–2720), 16 digits.

- `BankMirCardProbe` β€” MIR (prefixes: 2200–2204), 16 digits.

- `BankRupayCardProbe` β€” RuPay (prefixes: 508, 60, 65, 81, 82), 16 digits.

- `BankTroyCardProbe` β€” Troy (prefixes: 9792), 16 digits.

- `BankUnionpayCardProbe` β€” UnionPay (prefixes: 62), 16–19 digits.

- `BankVerveCardProbe` β€” Verve (prefixes: 5060, 5061, 6500–6509), 13–19 digits.

- `BankVisaCardProbe` β€” Visa (prefixes: 4), 13–19 digits.

#### πŸ”’ Card Security & Expiration

- `BankCardCvvCvcCodeProbe` β€” Extracts CVV/CVC codes (3–4 digits).

- `BankCardExpiryProbe` β€” Extracts card expiration dates (formats `MM/YY`, `MM/YYYY`, `MM-YY`, `MM-YYYY`, etc.).

#### πŸ”— Crypto

- `BitcoinAddressProbe` β€” Extracts Bitcoin addresses (Base58 and Bech32 formats).

- `EthereumAddressProbe` β€” Extracts Ethereum addresses (0x-prefixed, 40 hex characters).

- `LitecoinAddressProbe` β€” Extracts Litecoin addresses (Base58 or Bech32).

- `RippleAddressProbe` β€” Extracts Ripple/XRP addresses (starts with 'r', Base58).

- `SolanaAddressProbe` β€” Extracts Solana addresses (Base58, 32–44 chars).

- `TronAddressProbe` β€” Extracts TRON addresses (Base58, starts with 'T', 34 chars).

- `UsdcAlgorandAddressProbe` β€” Extracts USDC addresses on Algorand (Base32, 58 chars).

- `UsdcErc20AddressProbe` β€” Extracts USDC ERC20 addresses (Ethereum-compatible, 0x-prefixed).

- `UsdcSolanaAddressProbe` β€” Extracts USDC addresses on Solana (same format as Solana addresses).

- `UsdtErc20AddressProbe` β€” Extracts USDT ERC20 addresses (Ethereum-compatible, 0x-prefixed).

- `UsdtOmniAddressProbe` β€” Extracts USDT Omni addresses (Bitcoin-based, starts with 1 or 3, 26–35 chars).

- `UsdtTrc20AddressProbe` β€” Extracts USDT TRC20 addresses (TRON-based, Base58, starts with 'T', 34 chars).

### πŸ“¦ Logistics

#### πŸ“¦ Tracking numbers

- `Ups1ZTrackingProbe` β€” extracts UPS 1Z tracking numbers.

- `Fedex12Probe` β€” extracts FedEx 12-digit tracking numbers.

- `Fedex15Probe` β€” extracts FedEx 15-digit tracking numbers.

- `Fedex20Probe` β€” extracts FedEx 20-digit tracking numbers.

- `UspsNumeric20Probe` β€” extracts USPS 20-digit tracking numbers.

- `UspsNumeric22Probe` β€” extracts USPS 22-digit tracking numbers.

- `UspsIntlS10Probe` β€” extracts USPS S10-format tracking numbers.

- `DhlExpress10Probe` β€” extracts DHL Express 10-digit tracking numbers.

- `DpdTrackingProbe` β€” extracts DPD 14-digit tracking numbers.

- `GlsTrackingProbe` β€” extracts GLS tracking numbers (11–14 digits).

- `HermesEvriTrackingProbe` β€” extracts Hermes/Evri tracking numbers.

- `RoyalMailS10Probe` β€” extracts Royal Mail S10 tracking numbers.

- `LaPosteColissimoS10Probe` β€” extracts La Poste/Colissimo S10 tracking numbers.

- `CorreosS10Probe` β€” extracts Correos S10 tracking numbers.

- `PostnlTrackingProbe` β€” extracts PostNL tracking numbers.

- `BpostS10Probe` β€” extracts bpost S10 tracking numbers.

- `DeutschePostS10Probe` β€” extracts Deutsche Post S10 tracking numbers.

- `SwissPostS10Probe` β€” extracts Swiss Post S10 tracking numbers.

- `PosteItalianeS10Probe` β€” extracts Poste Italiane S10 tracking numbers.

- `PocztaPolskaS10Probe` β€” extracts Poczta Polska S10 tracking numbers.

- `PostNordS10Probe` β€” extracts PostNord S10 tracking numbers.

- `RussiaPostS10Probe` β€” extracts Russia Post S10 tracking numbers.

- `TrackingNumberProbe` β€” extracts tracking numbers across supported carriers.

### 🏷 Barcodes

- `Ean13Probe` β€” extracts EAN-13 barcodes.

- `UpcAProbe` β€” extracts UPC-A barcodes.

- `BarcodeValueProbe` β€” extracts barcode values across supported formats.

### πŸ—Ί Geolocation

- `GeoCoordinatesProbe` β€” extracts geographic coordinates in various formats (`decimal` or `degrees/minutes/seconds`,
`N/S/E/W`).

- `PostalCodeProbe` β€” extracts postal codes across multiple regions, including US ZIP (+4), Russian six-digit, UK,
Canadian, and Dutch-style codes.

### 🏷 Social & Tags

- `HashtagProbe` β€” extracts hashtags from text (e.g., `#example`), supporting Unicode letters, numbers, and underscores,
detecting hashtags in any position of the text.

### ✍️ Text

- `AllCapsSequenceProbe` β€” extracts sequences of two or more consecutive uppercase letters (Unicode-aware), making it
easy to detect acronyms or emphasised ALL CAPS tokens in text.

### πŸ†” UUID & Identifiers

- `HexHashProbe` β€” extracts common hexadecimal hash strings such as MD5, SHA-1,
SHA-224, SHA-256, SHA-384, and SHA-512, matching 32–128 hex characters while
avoiding partial matches inside longer strings.

- `UUIDProbe` β€” extracts any valid UUID (v1–v6) without checking the specific version. Supports standard UUID formats
with hyphens.

- `UUIDv1Probe` β€” extracts UUID version 1, matching the format `xxxxxxxx-xxxx-1xxx-xxxx-xxxxxxxxxxxx`, commonly used for
time-based identifiers.

- `UUIDv2Probe` β€” extracts UUID version 2, matching the format `xxxxxxxx-xxxx-2xxx-xxxx-xxxxxxxxxxxx`, typically used in
DCE Security contexts.

- `UUIDv3Probe` β€” extracts UUID version 3, matching the format `xxxxxxxx-xxxx-3xxx-xxxx-xxxxxxxxxxxx`, generated using
MD5 hashing of names and namespaces.

- `UUIDv4Probe` β€” extracts UUID version 4, matching the format `xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx`, randomly
generated and commonly used for unique identifiers.

- `UUIDv5Probe` β€” extracts UUID version 5, matching the format `xxxxxxxx-xxxx-5xxx-xxxx-xxxxxxxxxxxx`, generated using
SHA-1 hashing of names and namespaces.

- `UUIDv6Probe` β€” extracts UUID version 6, matching the format `xxxxxxxx-xxxx-6xxx-xxxx-xxxxxxxxxxxx`, an ordered
version for better indexing and sorting.

### βš™οΈ Versioning

- `SemanticVersionProbe` β€” extracts semantic version numbers in `MAJOR.MINOR.PATCH` format with optional pre-release
identifiers and build metadata, ensuring numeric identifiers avoid leading zeros while supporting dot-separated
alphanumeric segments.

- `ComposerConstraintProbe` β€” extracts Composer constraint strings with operators, ranges, and wildcard segments.

- `SemverRangeProbe` β€” extracts semantic version ranges, including Composer-style constraints.

### 🌐 Web & Network

- `DomainProbe` β€” extracts domain names, including internationalized (Unicode) domains.

- `IPv4Probe` β€” extracts IPv4 addresses, supporting standard formats and excluding reserved/bogus ranges if necessary.

- `PrivateIPv4Probe` β€” extracts private IPv4 addresses from the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 ranges.

- `IPv6Probe` β€” extracts IPv6 addresses, including compressed formats, IPv4-mapped addresses, and zone indexes (e.g.,
`%eth0`).

- `LinkProbe` β€” extracts hyperlinks, including ones with IP addresses, ports, or without a protocol.

- `GithubRepositoryLinkProbe` β€” extracts GitHub repository links over HTTP/HTTPS, supporting optional `.git` suffixes,
additional paths, and trimming trailing punctuation.

- `GoogleDocsLinkProbe` β€” extracts Google Docs, Sheets, Slides, and Forms links hosted on docs.google.com.

- `CookieProbe` β€” extracts HTTP cookie key/value pairs from `Set-Cookie` or `Cookie` headers, filtering out common
attributes like `Path` or `Expires`.

- `HtmlTagProbe` β€” extracts HTML tags, returning full paired segments with their content or standalone/self-closing
tags.

- `HexColorProbe` β€” extracts CSS-style hexadecimal color codes (`#fff`, `#ffffff`), ensuring only 3- or 6-digit values
are matched while ignoring longer hexadecimal tokens.

- `RgbRgbaColorProbe` β€” extracts RGB/RGBA color strings (e.g., `rgb(255,0,0)`, `rgba(255,0,0,0.5)`, `255,0,0`).

- `MacAddressProbe` β€” extracts MAC addresses in standard formats using colons or hyphens (e.g., `00:1A:2B:3C:4D:5E` or
`00-1A-2B-3C-4D-5E`), accurately detecting valid addresses while excluding invalid patterns.

- `JwtTokenProbe` β€” extracts JSON Web Tokens (JWT) in compact format (`xxxxx.yyyyy.zzzzz`), supporting Base64url
segments
with optional padding.

- `UserAgentProbe` β€” extracts User-Agent strings from text, supporting complex structures like multiple product tokens,
OS information, and browser identifiers.

- `FilePathProbe` β€” extracts absolute file paths in Linux (e.g., `/etc/passwd`) and Windows (e.g.,
`C:\\Windows\\System32`)
formats.

- `HttpStatusLineProbe` β€” extracts HTTP status lines like `HTTP/1.1 200` with valid status ranges.

- `HttpStatusCodeProbe` β€” extracts HTTP status codes from status lines or standalone numeric codes.

- `AbsoluteHttpUrlProbe` β€” extracts absolute HTTP/HTTPS URLs with optional ports and paths.

- `AbsolutePathProbe` β€” extracts absolute paths that start with `/`.

- `RestEndpointProbe` β€” extracts REST endpoints from absolute URLs or absolute paths.

- `QueryParamPairProbe` β€” extracts query parameter key/value pairs.

- `QueryStringProbe` β€” extracts full query strings starting with `?` and containing key/value pairs.

- `QueryParameterProbe` β€” extracts query parameters or query strings.

- `JsonQuotedKeyProbe` β€” extracts quoted JSON keys (e.g., `"name"`).

- `JsonKeyProbe` β€” extracts unquoted JSON-like keys (e.g., `name`).

- `JsonStringValueProbe` β€” extracts JSON string values.

- `JsonNumberValueProbe` β€” extracts JSON numeric values.

- `JsonBooleanValueProbe` β€” extracts JSON boolean values.

- `JsonNullValueProbe` β€” extracts JSON null values.

- `JsonValueProbe` β€” extracts JSON primitive values (string, number, boolean, null).

- `GraphqlOperationKeywordProbe` β€” extracts GraphQL operation keywords (`query`, `mutation`, `subscription`).

- `GraphqlSelectionSetProbe` β€” extracts GraphQL selection sets with balanced braces.

- `GraphqlQueryProbe` β€” extracts GraphQL query components (operation keywords or selection sets).

- `WsUrlProbe` β€” extracts `ws://` WebSocket URLs.

- `WssUrlProbe` β€” extracts `wss://` WebSocket URLs.

- `WebsocketUrlProbe` β€” extracts WebSocket URLs across `ws://` and `wss://` schemes.

- `CorsAllowOriginProbe` β€” extracts `Access-Control-Allow-Origin` headers.

- `CorsAllowMethodsProbe` β€” extracts `Access-Control-Allow-Methods` headers.

- `CorsAllowHeadersProbe` β€” extracts `Access-Control-Allow-Headers` headers.

- `CorsAllowCredentialsProbe` β€” extracts `Access-Control-Allow-Credentials` headers.

- `CorsExposeHeadersProbe` β€” extracts `Access-Control-Expose-Headers` headers.

- `CorsMaxAgeProbe` β€” extracts `Access-Control-Max-Age` headers.

- `CorsHeaderProbe` β€” extracts CORS headers across supported variants.

### βš™οΈ System & DevOps

- `K8sDnsLabelProbe` β€” extracts Kubernetes DNS labels (RFC1123 label format).

- `K8sDnsSubdomainProbe` β€” extracts Kubernetes DNS subdomains (RFC1123 subdomain format).

- `KubernetesResourceNameProbe` β€” extracts Kubernetes resource names.

- `KubernetesNamespaceStrictProbe` β€” extracts Kubernetes namespaces using DNS label rules.

- `KubernetesNamespaceProbe` β€” extracts Kubernetes namespaces using DNS subdomain rules.

- `HelmSemverProbe` β€” extracts Helm semantic versions.

- `HelmChartVersionProbe` β€” extracts Helm chart versions.

- `EnvAssignmentProbe` β€” extracts environment variable assignments like `KEY=value`.

- `EnvVariableProbe` β€” extracts environment variable names.

- `GithubActionsRunIdUrlProbe` β€” extracts GitHub Actions run URLs.

- `GitlabPipelineIdUrlProbe` β€” extracts GitLab pipeline URLs.

- `CircleciWorkflowUuidProbe` β€” extracts CircleCI workflow UUIDs.

- `CiPipelineIdProbe` β€” extracts CI pipeline IDs.

- `GitFullShaProbe` β€” extracts 40-character Git commit SHAs.

- `GitShortShaProbe` β€” extracts short Git commit SHAs.

- `GitCommitHashProbe` β€” extracts Git commit hashes (short or full).

- `GitRefHeadsProbe` β€” extracts `refs/heads/*` Git references.

- `GitBranchNameProbe` β€” extracts Git branch names.

- `GitRefTagsProbe` β€” extracts `refs/tags/*` Git references.

- `GitTagProbe` β€” extracts Git tag names.

### 🐳 Docker

- `DockerImageProbe` β€” extracts Docker image names with tags only (e.g., `nginx:1.25.1`, `redis:latest`, `ghcr.io/app/api:
v2`). Supports registries, multi-level namespaces, semantic and custom tags, while ignoring invalid or tagless image
names (e.g., python, myapp/web).

- `DockerContainerIdProbe` β€” extracts Docker container IDs in short and full formats from logs and CLI output (e.g.,
docker ps, docker logs, CI, orchestration traces). Detects lowercase hexadecimal IDs of 12 or 64 characters, ignoring
strings of other lengths or with non-hex characters.

- `DockerLabelProbe` β€” extracts Docker label key/value pairs from Dockerfiles and CLI commands (e.g.,
`LABEL version="1.0.0" description="API" vendor=acme`). Detects fragments in the form `key=value` and `key="value"`,
including multiple labels in a single instruction, without fully parsing Dockerfile syntax.

- `DockerCliFlagProbe` β€” extracts Docker CLI flags from arbitrary text (e.g., `-p 8080:80`, `-v ./src:/app`,
`--env KEY=VALUE`, `--name api`, `--rm`). Detects short and long options in both space and equals forms, with or
without arguments, making it suitable for parsing docker run commands, CI scripts, and orchestration logs without
full CLI parsing.

- `DockerfileInstructionProbe` β€” extracts Dockerfile instructions such as `FROM`, `RUN`, `COPY`, `ENV`, `HEALTHCHECK`,
including multiline continuations with `\`. Matches instruction blocks regardless of indentation and supports
case-insensitive detection of all core Dockerfile directives.

- `DockerImageDigestProbe` β€” extracts Docker image digests in the form `sha256:<64-hex>` from logs, Docker/registry
output
and SBOM metadata, including references like `image@sha256:`, while always returning only the digest value.

You can implement your own probes by creating classes that implement the `IProbe` interface.
Each probe also supports using a different validator for the returned values by passing an instance of a class
implementing the `IValidator` interface to the probe’s constructor. This allows you to override the default validation
logic.

For example, `BankCardNumberProbe` uses a default validator based on the Luhn algorithm, but you can provide your
own validator if you want to enforce additional rules, such as limiting to specific card issuers or formats.

## Usage Example

```php
require __DIR__ . '/vendor/autoload.php';

use TextProbe\TextProbe;
use TextProbe\Probes\Contact\EmailProbe;

$text = "Please contact us at info@example.com for more details.";

$probe = new TextProbe();
$probe->addProbe(new EmailProbe());

$results = $probe->analyze($text);

foreach ($results as $result) {
echo sprintf(
"[%s] %s (position %d-%d)\n",
$result->getProbeType()->name,
$result->getResult(),
$result->getStart(),
$result->getEnd()
);
}
```

### Expected output

```text
[EMAIL] info@example.com (position 21-37)
```