OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xri-editors message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Proposed regular expression for parsing XRIs


Appendix B of RFC 2396 provides a regular expression for parsing URIs. It
doesn't work for XRIs because we don't start with a // yet we still have an
authority component. Here's a stab at a regular expression that will parse
XRIs.

^((xri):)?((/{2}|@|=|\+|\*|\()([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?

I've attached a simple perl script you can use for testing.
I haven't exercised this very much, so it probably needs some tweaks. If
anyone's motivated, give it a try and let me know what valid XRIs it fails
on.

Dave

xriparse.pl



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]