I've been trying to learn lookaheads in Regex.
I am trying to match an expression that starts with a lowercase letter and has 4 or more digits.
/(?=\A[a-z])(?=\D\d{4,})/
This works if the digits are all adjacent to eachother, but not if they're away from each other. For example
z1562
- Passes (all 4 digits are adjacent)
z15a62
- Fails - Has 4 digits
Where am I going wrong here? How can I fix this?