[^OIl]
matches any character that's not O, I or l. The problems in your regex are:
- You don't have a
$
at the end, so it'd match any string beginning with a BC address.
- You didn't count the first character in your
{27,34}
- that should be {26,33}
However, as mentioned in a comment, a regex is not a good way to validate a bitcoin address.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…