Nothing to repeat Javascript regex -


I'm getting the error "nothing to repeat" / ^ [az] + [az] + [0] - 9] + [^ A-Za-z0- 9] + {8,} $ / when I run it or by using the string.match () function (you can paste the code ) Regx is trying to ensure that the string is at least 8 characters long, it includes lowercase A-jazz, uppercase e-z, at least one digit and one non-letter / number (special character).

Previous posts mention special characters, but I have not got anybody in this method, so why not get confused.

(? =. * [Az]) (? =? * [Az]) (? =. * \ D) (? =. * ([^ \ W] | _)). {8,}

You need regex above. You have two quantifiers, which are causing the error.



Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -