syncope-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From varontron <varont...@gmail.com>
Subject Misleading policy documentation (minor)
Date Tue, 17 Apr 2018 15:25:52 GMT
Hi,

In configuring an Account policy, I included a pattern conformity
requirement.

[\\w@\\-\\.]+

meaning all one word or a normal email address, and ok, hyphens too.

However, as you may have noticed, the double-backslashes confound the
pattern.  It should instead be:

[\w@\-\.]+

This appeared to work as intended.

The Reference Guide states "pattern - Java regular expression pattern to
match; NULL means no match is attempted;"

I inferred from this that, like in java regex strings, double-backslashes
were required for special characters:  

"The backslash character ('\') serves to introduce escaped constructs, as
defined in the table above, as well as to quote characters that otherwise
would be interpreted as unescaped constructs. Thus the expression \\ matches
a single backslash and \{ matches a left brace."

Perhaps the docs could clarify this?

Cheers,
Dave


-----
http://analgesicsolutions.com
https://github.com/Novartis/YADA

--
Sent from: http://syncope-dev.1063484.n5.nabble.com/

Mime
View raw message