Hi Murtuza,
The - character has special meaning when it appears within [] in a
regular expression. If you want to specify the character -, you will
need to escape it. Try the following:
<EMAIL>1 optional rgx="[\#a-z?0-9.\-_]+@ats[\#a-z?0-9.\-_]{0,70}"
</EMAIL>
Regarding your other questions:
2) I don't believe SGML tags are allows to contain ampersands.
3) I don't believe SGML tags are allowed to begin with numerals.
Select SDD Development | View SDDTypes... The regular expression used to
restrict tags for each type is listed in the table at the top of the
dialog.
Hope that helps,
Jeff
On Thu, 2005-12-15 at 10:40 +0000, Murtuza Khetty wrote:
>
> I'm using SD Validator for the first time and am using the SGML type.
>
> I have a few queries, which i have not been able to handle
>
>
> 1. I am validating an email field which should have the following
> attributes
>
> a) optional field
> b) should have only lowercase and numerals
> c) should have the term '@ats' in the field
> d) should be of maximum 70 characters
> e) should not allow ','';'':''/'as characters in the field
>
> I have been able to write two commands
>
> A. <EMAIL>? optional rgx="[\#a-z?=@_0-9-.!/,;:&$)(~^+]{0,70}"</EMAIL>
>
> This one satisfies a,b,d but not c and e
>
> B.<EMAIL>1 optional
> rgx="[\#a-z?0-9.-_]+@ats[\#a-z?0-9.-_]{0,70}"</EMAIL>
>
> This one satisfies a,c,d but not b and e
>
> Is there anyway by which a,b,c,d and e can be satisfied.
>
> 2. If my tag is B&W then it is giving an error...is renaming the tag
> to not contain ampersand(&) the only solution?
>
> 3. Also my tag name begining with a numeral is not being accepted...is
> renaming the tag to not begin with a numeral the only solution?
>
> Hope someone can help me on this one.
>
> Thanks
>
> Murtuza
>
>
>
>
>
>
>
>
>
|