What does this regular expression in joomla mean?

余生长醉 提交于 2019-12-23 12:59:09

问题


I was trying to install joomla on my website. While installing joomla, I was asked to create a MYSQl user. But I couldn't because, everytime I type as password, it gives a message saying the paswword doesn't meet the reqular expression requirement. Given below is the regular expression

'(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$' 

What does this mean? What password can I give? Give an example of a password that will pass this regular expression test. Please help me


回答1:


(?=^.{8,}$)

This part means has 8 more more characters, and the match starts at the start of input.

((?=.*\d)

Means contains a digit.

|(?=.*\W+))

Or contains something that is neither a letter or a digit

(?![.\n])

not starting with a dot or UNIX newline.

(?=.*[A-Z])

Contains at least one capital letter.

(?=.*[a-z])

Contains at least one lowercase letter

.*$

Consists entirely of non-newline characters and the matched group will contain the entire string.




回答2:


Password should be 8 symbols or more, atleast one digit or a non-character , atleast one lower alpha and atleast one upper alpha and not beginning with . or newline ( seriously?)

Example: Manojlds9



来源:https://stackoverflow.com/questions/5800156/what-does-this-regular-expression-in-joomla-mean

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!