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/

Reply via email to