Module: URI::RFC2396_REGEXP::PATTERN

Defined in:
lib/uri/rfc2396_parser.rb

Overview

Patterns used to parse URI’s

Constant Summary collapse

ALPHA =

alpha = lowalpha | upalpha

"a-zA-Z"
ALNUM =

alphanum = alpha | digit

"#{ALPHA}\\d"
HEX =

hex = digit | “A” | “B” | “C” | “D” | “E” | “F” |

"a" | "b" | "c" | "d" | "e" | "f"
"a-fA-F\\d"
ESCAPED =

escaped = “%” hex hex

"%[#{HEX}]{2}"
UNRESERVED =

mark = “-” | “_” | “.” | “!” | “~” | “*” | “‘” |

"(" | ")"

unreserved = alphanum | mark

"\\-_.!~*'()#{ALNUM}"
RESERVED =

reserved = “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” |

"$" | ","

reserved = “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” |

"$" | "," | "[" | "]" (RFC 2732)
";/?:@&=+$,\\[\\]"
DOMLABEL =

domainlabel = alphanum | alphanum *( alphanum | “-” ) alphanum

"(?:[#{ALNUM}](?:[-#{ALNUM}]*[#{ALNUM}])?)"
TOPLABEL =

toplabel = alpha | alpha *( alphanum | “-” ) alphanum

"(?:[#{ALPHA}](?:[-#{ALNUM}]*[#{ALNUM}])?)"
HOSTNAME =

hostname = *( domainlabel “.” ) toplabel [ “.” ]

"(?:#{DOMLABEL}\\.)*#{TOPLABEL}\\.?"