atom feed10 messages in org.oasis-open.lists.xri-editorsRE: [xri-editors] Proposed regular ex...
FromSent OnAttachments
Wachob, GabeJul 2, 2003 1:32 pm 
Dave McAlpinJul 2, 2003 1:39 pm 
Wachob, GabeJul 2, 2003 1:44 pm 
Dave McAlpinJul 2, 2003 1:59 pm 
Dave McAlpinJul 2, 2003 2:09 pm 
Wachob, GabeJul 2, 2003 2:22 pm 
Dave McAlpinJul 2, 2003 2:32 pm.doc
Drummond ReedJul 2, 2003 6:23 pm 
Dave McAlpinJul 2, 2003 7:03 pm.bin
Dave McAlpinJul 3, 2003 9:09 am 
Subject:RE: [xri-editors] Proposed regular expression for parsing XRIs
From:Dave McAlpin (dave@epokinc.com)
Date:Jul 3, 2003 9:09:25 am
List:org.oasis-open.lists.xri-editors

As Gabe diplomatically point out off-list, this is hopelessly broken with respect to cross-references. Just ignore it for now unless you have a clever idea for dealing with nesting levels (i.e. paren matching) using POSIX regular expressions.

Dave

-----Original Message----- From: Dave McAlpin [mailto:dave@epokinc.com] Sent: Wednesday, July 02, 2003 7:20 PM To: xri-@lists.oasis-open.org Subject: [xri-editors] 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.