Commit 9991bf23 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(Utils/uri-tools): in progress

parent 6b19193f
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
// Level 0. ---------------------------------------------------------- // Level 0. ----------------------------------------------------------
var URI_PCT_ENCODED = '%[A-Fa-f0-9]{2}' var URI_PCT_ENCODED = '%[A-Fa-f\\d]{2}'
var URI_PORT = '[0-9]*' var URI_PORT = '\d*'
var URI_SCHEME = '[a-zA-Z][a-zA-Z0-9+\-\.]*' var URI_SCHEME = '[a-zA-Z][\\w+\-\.]*'
var URI_SUB_DELIMS = '[!$&\'()*+,;=]' var URI_SUB_DELIMS = '[!$&\'()*+,;=]'
var URI_UNRESERVED = '[a-zA-Z0-9\-\._~]' var URI_UNRESERVED = '[\\w\-\._~]'
// Level 1. ---------------------------------------------------------- // Level 1. ----------------------------------------------------------
...@@ -65,6 +65,7 @@ var URI_PATH_ROOTLESS = ...@@ -65,6 +65,7 @@ var URI_PATH_ROOTLESS =
// Level 4. ---------------------------------------------------------- // Level 4. ----------------------------------------------------------
// `path-empty` not used.
var URI_HIER_PART = '(?:' + var URI_HIER_PART = '(?:' +
'//' + URI_AUTHORITY + URI_PATH_ABEMPTY + '//' + URI_AUTHORITY + URI_PATH_ABEMPTY +
'|' + URI_PATH_ABSOLUTE + '|' + URI_PATH_ABSOLUTE +
...@@ -90,10 +91,6 @@ function test () { ...@@ -90,10 +91,6 @@ function test () {
test() test()
/* TODO: Supports: /* TODO: Supports:
hier-part = "//" authority path-abempty
/ path-absolute
/ path-rootless
/ path-empty
URI-reference = URI / relative-ref URI-reference = URI / relative-ref
...@@ -141,7 +138,6 @@ test() ...@@ -141,7 +138,6 @@ test()
/ path-empty ; zero characters / path-empty ; zero characters
path-noscheme = segment-nz-nc *( "/" segment ) path-noscheme = segment-nz-nc *( "/" segment )
path-empty = 0<pchar>
segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" ) segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
; non-zero-length segment without any colon ":" ; non-zero-length segment without any colon ":"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment