Thanks Walter.

On Thu, Oct 6, 2011 at 5:51 PM, Walter Underwood <
[email protected]> wrote:

> I'd do this with a series of individual tests, rather than a regex. Fails
> if it is too short, fails if does not have a numeral, etc.
>
> The password checking plugins are designed to work this way, with a set of
> individual, simple tests.
>
> wunder
> Walter Underwood
> Server Engineering, MarkLogic
>
> On Oct 6, 2011, at 4:35 PM, Keith Breinholt wrote:
>
> > I'd like to use fn:matches() to validate that a password has an
> acceptable set of characters.
> >
> > A typical regex for password validation is
> "/^(?=^.{6,}$)((?=.*[A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z]))^.*$/"
> >
> > However, if I use that regex like this
> >
> >   fn:matches( $pwd,
> "^(?=^.{6,}$)((?=.*[A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z]))^.*$" )
> >
> > It throws an invalid regular expression exception.
> >
> > Is there another expression that I could use to validate length, upper
> and lower case letters and at least on number?
> >
> > --
> > Keith
> >
> > _______________________________________________
> > General mailing list
> > [email protected]
> > http://developer.marklogic.com/mailman/listinfo/general
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>



-- 
Keith
"Do what you can, with what you have, where you are." - Theodore Roosevelt
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to