RegEx vs. Syntax

123 views
Skip to first unread message

Elliotte Harold

unread,
Aug 16, 2008, 3:37:29 PM8/16/08
to jsr...@googlegroups.com
At first I thought the RegEx annotation meant that a value matched a
regular expression. However looking at the code I don't see that.
Instead it looks like it merely checks that the value *is* a regular
expression, not that it *matches* a regular expression.

This seems redundant with @Syntax('RegEx'). I suggest rejiggering the
@RegEx annoation so it really does match the regex supplied. However if
that won't work for some reason I'm not seeing, then delete it
completely. It doesn't do anything @Syntax can't do.

--
Elliotte Rusty Harold elh...@metalab.unc.edu
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA

Bill Pugh

unread,
Aug 25, 2008, 1:09:10 AM8/25/08
to jsr...@googlegroups.com
The RegEx annotation _is_ just a shorthand for @Syntax("RegEx"), but
it also provides a custom validator.

I guess having that as a special annotation clutters up the spec, so
I'm happy to remove it.

The question is whether or not you can define a custom validator for a
type qualifier nickname.

I'm now starting to think that the answer should be no.

Bill

Reply all
Reply to author
Forward
0 new messages