Securityflags: g
Bitcoin Address
Match Bitcoin addresses in legacy (P2PKH/P2SH) and SegWit Bech32 (bc1) formats.
Try it in RegexPro →Available in
Pattern
regexengine-agnostic
\b(?:[13][a-km-zA-HJ-NP-Z1-9]{25,34}|bc1[a-zA-HJ-NP-Z0-9]{25,62})\b (flags: g)Raw source: \b(?:[13][a-km-zA-HJ-NP-Z1-9]{25,34}|bc1[a-zA-HJ-NP-Z0-9]{25,62})\b
How it works
Legacy addresses start with 1 or 3 followed by 25–34 Base58 characters (no 0, O, I, l). Bech32 SegWit addresses start with bc1 followed by 25–62 chars from its restricted alphabet.
Examples
Input
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNaMatches
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
Input
3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLyMatches
3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy
Common use cases
- •Wallet address validation
- •Forensic / compliance scans
- •Donation link generation
- •On-chain analytics preprocessing
Related patterns
AWS Access Key ID
SecurityMatch AWS access key IDs (both long-term AKIA and temporary ASIA prefixes).
bcrypt Password Hash
SecurityMatch bcrypt password hashes in their canonical $2a$/$2b$/$2y$ prefixed format.
Bearer Token (Authorization Header)
SecurityMatch Bearer token values from HTTP Authorization headers, capturing the raw token string.
Generic API Key
SecurityMatch generic long alphanumeric tokens (32+ chars) typical of API keys and access tokens.