Module: PortRegexes

Included in:
TopinambourRegex
Defined in:
lib/terminal_regex.rb

Constant Summary collapse

N_1_65535 =

Number between 1 and 65535, with lookahead at the end so that we don’t match “6789” in the string “67890”, and in turn we don’t eventually match “host:6789” in “host:67890”. */

"(?x: (?: [1-9][0-9]{0,3} | [1-5][0-9]{4} | 6[0-4][0-9]{3} | 65[0-4][0-9]{2} | 655[0-2][0-9] | 6553[0-5] ) (?! [0-9] ) )"
PORT =

Optional colon-prefixed port, e.g. “:1080”, “” */

"(?x: \\:#{N_1_65535} )?"