Hi
I have problem with lookahead assertion (?=). For example, I have expression:
/Win(?=2000)/
It match Win
, if expression is like Win2000
, Win2000fgF
. I have next expression:
^(?=.*\d)(?=.*[a-z]).*$
It match for digit and lower case letter, for example: 45dF
, 4Dd
. But I don't know, why it works and match all characters :) I haven't characters, which are before (?=.*\d)
. I think, only this expression should work:
^.\*(?=.*\d)(?=.*[a-z]).*$
(with \*
before expression).
Could you explain it?
Regards