Strong Password in GO
Go (RE2) can't run this pattern out of the box.
Try it in the GO tester →Why it doesn't work in GO
Go's RE2 engine doesn't support lookarounds (`(?=...)`, `(?<=...)`, etc.) — they break the linear-time matching guarantee.
Workaround
Restructure to capture the surrounding context as a group instead, or use JS / Python where lookarounds are available.
Pattern
regexGO
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d\s]).{8,}$How the pattern works
Uses four lookaheads from the start (^) to assert each required character class exists somewhere in the string, then .{8,} ensures minimum length, and $ anchors the end.
Examples
Input
MyP@ssw0rdMatches
MyP@ssw0rd
Input
password123No match
—Input
SHORT1!No match
—