Re: Password filter
| From: | Aziz Saleh | Date: | Sun, 14 Jan 2018 15:54:14 +0000 |
| Subject: | Re: Password filter | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-326345@lists.php.net to get a copy of this message | ||
On Sun, Jan 14, 2018 at 10:46 AM, Tedd Sperling <tedd@sperling.com> wrote:
> Per:
>
> Thanks — I think that will do it.
>
> Cheers,
>
> tedd
>
> ---
>
> > On Jan 14, 2018, at 4:45 AM, Per Jessen <per@computer.org> wrote:
> >
> > Tedd Sperling wrote:
> >
> >> Ash:
> >>
> >> I agree, but tell that to my client.
> >>
> >
> > if the requirements are really simple, such as those you mentioned in
> > your OP, a single regex, possibly split into more for clarity, will
> > suffice.
> >
> > /[A-Z]/ "must contain at least one upper case"
> > /[a-z]/ "must contain at least one lower case"
> > /[0-9]/ number
> > /[%.;:,_-]/ symbols
> > /^.{8}/ length>=8
> >
> > Keep an eye out for whitespace - e.g. trailing.
> >
> >
> > --
> > Per Jessen, Zürich (0.8°C)
> > http://www.cloudsuisse.com/ - your owncloud, hosted in
> > Switzerland.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> _______________
> tedd sperling
> tedd@sperling.com
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
This pattern should do the trick (taken from SO + modifications):
http://www.rubular.com/r/JJfQkmoDHr