Title |
Test
Find
Pattern Title
|
Expression |
urn:[a-z0-9]{1}[a-z0-9\-]{1,31}:[a-z0-9_,:=@;!'%/#\(\)\+\-\.\$\*\?]+ |
Description |
Matches canonical Uniform Resource Names (URNs) as defined in RFC 2141. |
Matches |
urn:vrml:umel:/some/dir/file.ext | urn:schemas-microsoft-com:xml-data | URN:foo:a123,456 |
Non-Matches |
urn:11111.345:12 | http://www.example.org/ | urn:a#-12:555 |
Author |
Rating:
Mark Ayers
|
Source |
|
Your Rating |
|
Title: I found the solution
Name: Diego
Date: 7/6/2016 3:38:15 PM
Comment:
Hi, i found a solution to this case:
urn:urn:123
^urn:(?!urn:)[a-z0-9]{1}[a-z0-9\-]{1,31}:[a-z0-9_,:=@;!'%\/#\(\)+\-\.\$\*\?]+$
now this case is not matched
Title: Good, but fail in one case
Name: Diego
Date: 6/2/2016 8:34:36 PM
Comment:
Hi,
thanks for your job, I found only one thing to fix, in the NID value the RFC 2141 explain the follow:
To avoid confusion with the "urn:" identifier, the NID "urn" is reserved and MUST NOT be used.
and for that this urn "urn:urn:123" is invalid.
is possible fix that? thanks!