Uses rule negation against the regex for positive security. The regex specifies the proper construction of URI request lines such as:

"http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

It also outlines proper construction for CONNECT, OPTIONS and GET requests.

/// A description of the regular expression:
///
/// Beginning of line or string
/// Match expression but don't capture it. [(?:[a-z]{3,10}\s+(?:\w{3,7}?://[\w\-\./]*(?::\d+)?)?/[^?#]*(?:\?[^#\s]*)?(?:#[\S]*)?|connect (?:\d{1,3}\.){3}\d{1,3}\.?(?::\d+)?|options \*)\s+[\w\./]+|get /[^?#]*(?:\?[^#\s]*)?(?:#[\S]*)?]
/// Select from 2 alternatives
/// (?:[a-z]{3,10}\s+(?:\w{3,7}?://[\w\-\./]*(?::\d+)?)?/[^?#]*(?:\?[^#\s]*)?(?:#[\S]*)?|connect (?:\d{1,3}\.){3}\d{1,3}\.?(?::\d+)?|options \*)\s+[\w\./]+
/// Match expression but don't capture it. [[a-z]{3,10}\s+(?:\w{3,7}?://[\w\-\./]*(?::\d+)?)?/[^?#]*(?:\?[^#\s]*)?(?:#[\S]*)?|connect (?:\d{1,3}\.){3}\d{1,3}\.?(?::\d+)?|options \*]
/// Select from 3 alternatives
/// [a-z]{3,10}\s+(?:\w{3,7}?://[\w\-\./]*(?::\d+)?)?/[^?#]*(?:\?[^#\s]*)?(?:#[\S]*)?
/// Any character in this class: [a-z], between 3 and 10 repetitions
/// Whitespace, one or more repetitions
/// Match expression but don't capture it. [\w{3,7}?://[\w\-\./]*(?::\d+)?], zero or one repetitions
/// \w{3,7}?://[\w\-\./]*(?::\d+)?
/// Alphanumeric, between 3 and 7 repetitions, as few as possible
/// ://
/// Any character in this class: [\w\-\./], any number of repetitions
/// Match expression but don't capture it. [:\d+], zero or one repetitions
/// :\d+
/// :
/// Any digit, one or more repetitions
/// /
/// Any character that is NOT in this class: [?#], any number of repetitions
/// Match expression but don't capture it. [\?[^#\s]*], zero or one repetitions
/// \?[^#\s]*
/// Literal ?
/// Any character that is NOT in this class: [#\s], any number of repetitions
/// Match expression but don't capture it. [#[\S]*], zero or one repetitions
/// #[\S]*
/// #
/// Any character in this class: [\S], any number of repetitions
/// connect (?:\d{1,3}\.){3}\d{1,3}\.?(?::\d+)?
/// connect
/// Space
/// Match expression but don't capture it. [\d{1,3}\.], exactly 3 repetitions
/// \d{1,3}\.
/// Any digit, between 1 and 3 repetitions
/// Literal .
/// Any digit, between 1 and 3 repetitions
/// Literal ., zero or one repetitions
/// Match expression but don't capture it. [:\d+], zero or one repetitions
/// :\d+
/// :
/// Any digit, one or more repetitions
/// options \*
/// options
/// Space
/// Literal *
/// Whitespace, one or more repetitions
/// Any character in this class: [\w\./], one or more repetitions
/// get /[^?#]*(?:\?[^#\s]*)?(?:#[\S]*)?
/// get
/// Space
/// /
/// Any character that is NOT in this class: [?#], any number of repetitions
/// Match expression but don't capture it. [\?[^#\s]*], zero or one repetitions
/// \?[^#\s]*
/// Literal ?
/// Any character that is NOT in this class: [#\s], any number of repetitions
/// Match expression but don't capture it. [#[\S]*], zero or one repetitions
/// #[\S]*
/// #
/// Any character in this class: [\S], any number of repetitions
/// End of line or string