In my code I had a Password RegEx (written by someone)
(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[\x20-\x7E]{8,40}$/
) which was not supporting french characters.
And I modified it a bit to support french characters. And
/^(?=.*[a-z])(?=.*[A-Z])(?:.*[àâäæèéêëîïôœùûüÿçÀÂÄÈÉÊËÎÏÔŒÙÛÜŸÇ]*)(?=.*\d)[\x20-\x7E]{8,40}$/
is the new RegEx. But this one does not work as expected. The behavior changes with the position of the french character.
For example, NewàTest123! - works and NewTàest123! does not works
Any thoughts on why it fails when the position of the character changes?
答案 0 :(得分:0)
正则表达式工作
:^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[\x20-\x7EàâäæèéêëîïôœùûüÿçÀÂÄÈÉÊËÎÏÔŒÙÛÜŸÇ]{8,40}$
感谢@WiktorStribiżew