Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: validating IP addresses using XML Schema

From: "Johnny Kent" <removeThis.huuanito@-------.--->
To: NULL
Date: 8/5/2004 10:25:00 PM
"Richard Tobin" <richard@c...> wrote in message
news:cete5q$kbu$1@p......
> In article <uDiQc.6675$Uh.4292@fed1read02>,
> Johnny Kent <removeThis.huuanito@h...> wrote:
>
> >this
> >[1-9]?[0-9]|1[0-9][0-9]
> >
> >is not the same as this
> >1[0-9][0-9]|[1-9]?[0-9]
>
> It is, according to the XML Schema specification, and other regular
> expression languages I'm familiar with.

Agreed.
Sorry, instead of "(Despite what you'd think)" I should have said "contrary
to the rules of regular expressions"
in my post.


>
> The operator | binds less tightly than any other operator, including
> concatenation.
>
> Which strings did the tester give different results for?

try entering 199 using the patterns above,
none of the 3 browsers I tried (although 2 are really mozilla though they
don't act the same) match 199
 using the first pattern [1-9]?[0-9]|1[0-9][0-9]
but all 3 matched 199
using the second pattern 1[0-9][0-9]|[1-9]?[0-9]

>And what browser
> were you using (it tests the browser's Javascript regular expressions).

Same result for both IE5, Mozilla (1.7) and Firefox(0.8.0+)
Guess the tester must be what's bad 'cos it sure ought to work both ways.



Looks like the OP has moved on and left us to keep this alive... :-)






transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent