The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,676 other followers

XSD regular expressions are a tad different: creating GroupProj.xsd

Posted by jpluimers on 2014/12/31

While creating jeroenp / BeSharp.net / source / Native / Delphi / Scripts / GroupProj.xsd — Bitbucket, I bumped into the fact that regular expressions in XSD *or better XML Schema Regular Expressions) regular expressions are a tad different than the RegEx.

Actually, there are quite a few regular expression flavours, and all of them are a tad different. The page Compare Regular Expression Flavors at Regular-Expressions.info.

That is a great site with Regex Tutorial, Examples and Reference – Regexp Patterns by RegEx guru Jan Goyvaerts (yes, that looks Dutch, but he was born in Belgium and now lives in Phuket) famous for tools like PowerGREP and RegExBuddy. All based on the great Delphi RegEx PCRE library written by Jan and included in Delphi XE and up.

The thing that baffled me most is that even though XML Schema Regular Expressions do not support anchors ^ and $, you still have to escape them.

–jeroen

via: XML Schema Regular Expressions.

2 Responses to “XSD regular expressions are a tad different: creating GroupProj.xsd”

  1. XML Schema according to the standard from W3 supports Level 1 Regular Expressions according to the Unicode Regular Expressions: http://www.unicode.org/reports/tr18/ . It depends on your XMLSchemaParser what is supported in your tooling. But an XMLSchemaParser which follows the standard (which it should) does support a well defined set of Regular Expressions. I don’t know what Jan Govaerts supports, but I think that mentioning his name as a reference to what XML Schema should support is not quite right.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: