I am trying to employ a common regex for password verification in PHP 5.0.5. The goal is to simply reject passwords that don't meet the length requirement of 8-25 characters, and that don't have at least one each of numbers, upper case and lower case letters. I grabbed this example from a regex reference site: ("^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,25}$ My code looks like this: if (!eregi("^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,25}$",$password) {//do something} This gives me the following error: "Warning: eregi() [function.eregi]: REG_BADRPT..." The problem seems to be with the ?= lookahead operator. All references suggest this is valid code, but PHP seems to choke on it. Other regex seem to work fine, so I'm at a loss. Can any experts offer any ideas? Thanks in advance. - David Marks