W3C home > Mailing lists > Public > semantic-web@w3.org > June 2009

Re: ASK: URI validation service

From: Phil Archer <phil@philarcher.org>
Date: Tue, 23 Jun 2009 16:36:47 +0100
Message-ID: <4A40F68F.7080600@philarcher.org>
To: Michael Schneider <schneid@fzi.de>
CC: semantic-web@w3.org
Hi Michael,

This may not be robust enough for your needs but I just use a regex for 
scheme://host/path URIs/IRIs. If it matches, it's a URI:

(/^[^:\/?#]+:\/\/[^\.\/\/\#]+\.[^\.\/\/\#]+[^\/\/\#]*\//)

This is based on the one in the POWDER Grouping spec [1].

Cheers

Phil.


[1] http://www.w3.org/TR/powder-grouping/#rabinsRegEx



Michael Schneider wrote:
> Hi!
> 
> Is there any online URI/IRI validation service, which takes a string and reliably tells me whether the string matches the specification of a URI or IRI according to RFC 3986 or RFC 3987, respectively?
> 
> Cheers,
> Michael
> 
> --
> Dipl.-Inform. Michael Schneider
> Research Scientist, Dept. Information Process Engineering (IPE)
> Tel  : +49-721-9654-726
> Fax  : +49-721-9654-727
> Email: michael.schneider@fzi.de
> WWW  : http://www.fzi.de/michael.schneider
> =======================================================================
> FZI Forschungszentrum Informatik an der Universität Karlsruhe
> Haid-und-Neu-Str. 10-14, D-76131 Karlsruhe
> Tel.: +49-721-9654-0, Fax: +49-721-9654-959
> Stiftung des bürgerlichen Rechts, Az 14-0563.1, RP Karlsruhe
> Vorstand: Prof. Dr.-Ing. Rüdiger Dillmann, Dipl. Wi.-Ing. Michael Flor,
> Prof. Dr. Dr. h.c. Wolffried Stucky, Prof. Dr. Rudi Studer
> Vorsitzender des Kuratoriums: Ministerialdirigent Günther Leßnerkraus
> =======================================================================
> 

-- 

Phil Archer
http://philarcher.org/

i-sieve technologies                |      W3C Mobile Web Initiative
Beyond Impressions                  |      www.w3.org/Mobile
Received on Tuesday, 23 June 2009 15:37:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:47:58 UTC