On Wed, 24 Feb 2021 18:37:42 -0800 (PST) John Hardin wrote: > On Wed, 24 Feb 2021, Alan wrote: > > > After a little more research, a better regex for an obfuscated BTC > > address is > > > > /[13][ \-]([a-km-zA-HJ-NP-Z0-9][ \-]){25,32}[a-km-zA-HJ-NP-Z0-9]/ > > > > It might be worth adding = and _ to the obfuscating delimiters. > > YMMV. > > I've updated __BITCOIN_ID with -, = and _ obfuscations, which I > haven't seen myself yet. > > Thanks! >
Possibly (?:[-_=\s][a-km-zA-HJ-NP-Z1-9]){25,34}|[a-km-zA-HJ-NP-Z1-9]{25,34}) should be (?:[-_=\s]*[a-km-zA-HJ-NP-Z1-9]){25,34} It's shorter and more general.