Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xsd regular expression query

From: rorymo@-----.---
To: NULL
Date: 4/5/2007 8:50:00 AM

On Apr 4, 5:40 pm, use...@tech-know-ware.com wrote:
> On 4 Apr, 17:08, ror...@gmail.com wrote:
>
>
>
>
>
> > On Apr 3, 12:46 pm, use...@tech-know-ware.com wrote:
>
> ...
> > > It looks to me that Bj=F6rn's pattern achieves this.  (Which filling =
in
> > > the dots would be:
>
> > > (^[ dgHhMmstyf,\-\./:;\\]|'[^']*')*
>
> > > Can you do a test program and show some examples where it does not
> > > work?
>
> > The pipe(|) in you regular expression means 'or' right? If so then you
> > can only have the characters dgHhMmstyf,\-\./:;\\ OR characters in
> > quotes but not both in the same string so you can have:
>
> > dddd, d. MMMM yyyy
> > OR
> > 'ab$olutN0n$en$e'
> > But not
>
> > dddd, d. MMMM yyyy 'ab$olutN0n$en$e'
>
> > Does this make sense?
>
> But that's then wrapped in a set of brackets and a *.  So you can have
> any number of occurences of:
>
> dddd, d. MMMM yyyy
> OR
> 'ab$olutN0n$en$e'
>
> which means you can have:
>
> dddd, d. MMMM yyyy 'ab$olutN0n$en$e'
>
> Note the pattern mentioned earlier is wrong.  To match Bjorn's
> suggestion it should not have had the first ^, so it becomes:
>
> ([ dgHhMmstyf,\-\./:;\\]|'[^']*')*
>
> I recommend loading the pattern into whatever is the most convenient
> regular expression parser for you such as Perl, PHP, Java, C#,
> Javascript, and developing a number of test cases.  Then check that
> each one passes or fails as is appropriate.  Then where there's
> errors, list them here.
>
> If you don't have a convenient regular expression engine locally you
> might be able to download a pure regular expression tester, or do
> something on the web such as:http://www.nvcc.edu/home/drodgers/ceu/resour=
ces/test_regexp.asp
>
> BTW - when testing a regular expression destined for a schema on a
> normal regular expression engine, remember to put ^ and $ anchors
> around it.
>
> HTH,
>
> Pete.
> --
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Pete Cordell
> Tech-Know-Ware Ltd
> for XML to C++ data binding visithttp://www.tech-know-ware.com/lmx/http:/=
/www.codalogic.com/lmx/
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D- Hide quote=
d text -
>
> - Show quoted text -

I have it working now. Thanks a lot to all who replied.

-Rory.



transparent
Print
Mail
Like It
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